Is there a way to set the Millisecs() Counter to a specific value, eg by an Api Call?
Set Millisecs() ?
Blitz3D Forums/Blitz3D Userlibs/Set Millisecs() ? As far as I can see there is only a function to get the value (Gettickcount()), which is I suppose only to be expected. I would be suprised if windows offered an easy way to fiddle with the system timer.
I think some other rogramming languages do support this. I've seen this, tho I am not sure if this was on a Atari ST or on a Windows Machine. But I guess it must be possible somehow, at least by using some low-level Port Commands. Just like it's possible to patch the Bios with Qbasic with the Inp and Out Port Commands - tho it is really not reccomended :)
Probably it's possible to reset the Millisecs Timer with the Function "SetSystemTime" of kernel32.dll. It expects a pointer to a struct that looks like:
Private Type SYSTEMTIME
wYear As Integer
wMonth As Integer
wDayOfWeek As Integer
wDay As Integer
wHour As Integer
wMinute As Integer
wSecond As Integer
wMilliseconds As Integer
End Type
I wonder if wMilliseconds holds the TickCount Value, or only the Millisecs between the current and the next second.
Private Type SYSTEMTIME
wYear As Integer
wMonth As Integer
wDayOfWeek As Integer
wDay As Integer
wHour As Integer
wMinute As Integer
wSecond As Integer
wMilliseconds As Integer
End Type
I wonder if wMilliseconds holds the TickCount Value, or only the Millisecs between the current and the next second.