query about datetime struct
hi..
while i'm using datetime struct in a c# forms application for pocket pc i'm not able to read the number of milliseconds..it is showing the resolution of one tenth of a second...that is it is showing the seconds as 2.3 s or 2.4 s but not as 2.345 s...but when used in desktop computer it is showing the resolution of 1 millisecond...is it because i made it compatible to pocket pc...if so..is there any way to use a timer with one millisecond resolution...i tried the timer class too but it is not being recognised(ambiguous class) in pocket pc compatible program...can somebody help with this out...
thank u...
gangi reddyPosted Jun 29, 2007, 8:09 AM
AlanPosted Jun 29, 2007, 6:08 AM
This may be due to the resolution of DateTime in Windows CE being limited to one second compared to 10ms on modern desktop versions of Windows. See for example the note in this link:
http://msdn2.microsoft.com/en-us/library/system.datetime.now.aspx
However, as suggested in the link, you can obtain greater accuracy by using the Environment.TickCount property instead.