Click to See Complete Forum and Search --> : [RESOLVED] Timer Function in VB.NET


remya1000
09-10-2007, 10:31 PM
I'm using VB.NET.
in VB6 we have a function called Timer, which returns a Single value that represents the number of seconds that have elapsed since midnight.

for eg:
lngStartTimer = Timer

but in VB.NET, while i try to use this timer function, error occurs. i'm not able to use this Timer function in VB.NET. but i need to take time as we take time using Timer(no: of seconds since midnight).

anyone have anyidea, how to use timer function in VB.NET. please let me know. and if you can provide any eg: that will be great help for me.

thanks in advance.

remya1000
09-11-2007, 10:10 AM
Heah by using this code its working... now its returns a Single value that represents the number of seconds that have elapsed since midnight. i'm getting values in seconds.


lngStartTime = Microsoft.VisualBasic.Timer

lngEndTime = Date.Now.TimeOfDay.TotalSeconds


and both theses codes were returning the time in seconds.

thanks a lot for this help.