Archived

This topic is now archived and is closed to further replies.

moore52

speed up windows clock

Recommended Posts

There is any possible way to speed up windows clock? (for example in 1 second will past 5 seconds) mayby incresing time every seconds, but it wont affect gettickcount(). There is any program doing that?

Share this post


Link to post
Share on other sites
not if you plan on slowing it down for all of windows. if you wanted to slow down your program you could by creating you own function to call the gettickcount() when u need to. gettickcount pulls its "tick" from hardware i beileve, thereby making it impossible to slow the tick down.

r3alityc0d3r
icq: 252463839
r3alityc0d3r@hotmail.com
"I am the Architect. I created the Matrix...Your life is the sum of a remainder of an unbalanced equation inherent to the programming of the Matrix. Which has led you, inexorably... here." Great Architect - Matrix Reloaded

Share this post


Link to post
Share on other sites
quote:
Original post by r3alityc0d3r
thereby making it impossible to slow the tick down.



Not necessarily- I believe it''d be possible if you were willing to dive into kernel mode. If you hooked the Timer Interrupt, you could keep a variable like unsigned short int Count; and every time the Timer Interrupt Hook function is called you could check if 5 == Count. If it does, pass on the message, otherwise ++Count and ignore the message.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Also, as toolmaker suggested, you can set the timer frequency in asm.

Fat chance of doing that in a real os though, without screwing stuff up.

Here is what you can do:

If you really want to slow down the time for everyone, make your own version of user32.dll (or whatever others are needed), and override the various time functions to return your bogus values.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Another way is to use the SetTimer() API say, to call a proc every 5ms. To stop this timer you use KillTimer().. Look these up in the MSDN library or the msdn site.

Share this post


Link to post
Share on other sites
If you twiddle the timer freq, you'll task switcher will run that much faster too. You have to keep the old ISR around, and call it at the old rate from your new one (which handles the turbo timer tick rate).

That's how they did voice through the PC speaker. They cranked the timer up to something like 16kHz (which gave you 8kHz of audio bandwidth - that's why it sounded like crap), and modulated the PC speaker from the interrupt (and if they didn't do it right, when you exitted the program, the computer thought it was the year 2050).

I forgot which hole it is, but it's an unsigned short and 65535 gives you 18.2Hz.

[edited by - Magmai Kai Holmlor on October 10, 2003 9:55:11 PM]

Share this post


Link to post
Share on other sites
Correct me if I''m wrong, But can''t you just put that code in a while loop and make it so foreach second add 5 to a int? Then when the int reaches a certain number have the code do somthing.
Mabey that''s just messed up but hey, I tried.
-demonrealms
[qoute]
-You can try all you want, that''s not what matters, it matters
what you finish - asuack.[/qoute]

Share this post


Link to post
Share on other sites