get time function

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have been using a program which depends on getting the system time from the
computer. It works perfectly on XP but is slower on 98. Specifically, it
takes 50 or 60 mSec for the system time to be updated in 98 but only 16 or 16
mSec in XP. Anyone have any thoughts?
 
It will also depend on how many cycles a second your processor does too

Crouchie1998
BA (HONS) MCP MCSE
 
Selectum said:
I have been using a program which depends on getting the system time from
the
computer. It works perfectly on XP but is slower on 98. Specifically, it
takes 50 or 60 mSec for the system time to be updated in 98 but only 16 or
16
mSec in XP.

You may want to use p/invoke with the 'QueryPerformanceCounter',
'QueryPerformanceFrequency', and 'timeGetTime' functions (see
documentation). 'timeGetTime' has a precision of one millisecond on Windows
95.
 
Yes it will depend on the clock speed but that is not an issue here. The "get
system time" function is in a DoLoop which does execute and evaluates (and
updates) program data at the same rate as the computer running XP. The system
time output is the same for 4 or 5 successive iterations on the computer
running 98 but is updated with each iteration on the XP computer.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top