Hack Forums
[.NET] Chrono meter - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [.NET] Chrono meter (/showthread.php?tid=4426122)



Chrono meter - iSevere - Sep 1, 2014

Hello . I am just doing an application with a chrono meter . The problem is i come across 2 ways but i dont know which is correct .

First is here : https://docs.google.com/file/d/0B3rLgkFC-ZlaN1FBU2Z5RjI0R2s/edit?pli=1

Second is here :
Code
Dim comp As Date = DateTime.Now  
Private Sub Timer1_Tick(sender As System.Object, e As System.EventArgs) Handles Timer1.Tick
Dim comprefre As Date = DateTime.Now
Label2.Text = "Computer Opened Total For : " + (comprefre - comp).ToString

The problem is if i use them in 2 different timers they dont give the same result( one will give ms . the problem is with the seconds .... ) . Which is the correct ???


Common guys . Why you dont answere ???