Revision history for ioMicroMSecs


Revision [403]

Last edited on 2010-09-12 21:15:05 by JohnMcIntosh
Additions:
See Unix


Revision [402]

Edited on 2010-09-12 21:13:42 by JohnMcIntosh
Additions:
See iPhone
Deletions:
TBD


Revision [253]

Edited on 2008-10-18 02:00:27 by JohnMcIntosh
Additions:
By default these are defined in sq.h as
sqInt ioMSecs(void);
/* deprecated out ofexistence sqInt ioLowResMSecs(void); */
sqInt ioMicroMSecs(void);
#define ioMSecs() ((1000 * clock()) / CLOCKS_PER_SEC)
/* this macro cannot be used now that ioMicroMSecs is involved in the
sqVirtualMachine structures - we must have a function
#define ioMicroMSecs() ((1000 * clock()) / CLOCKS_PER_SEC)
*/


Revision [111]

Edited on 2008-10-14 23:28:39 by JohnMcIntosh
Additions:
ioMSecs may call timeGetTime or GetTickCount
The timeGetTime function retrieves the system time, in milliseconds. The system time is the time elapsed since Windows was started. GetTickCount The return value is the number of milliseconds that have elapsed since the system was started.
Windows systems may only be accurate to 5 ms.


Revision [110]

Edited on 2008-10-14 23:11:42 by JohnMcIntosh
Additions:
**return**: return milliseconds via primitiveMillisecondClock
Deletions:
**return**: return milliseconds


Revision [109]

Edited on 2008-10-14 23:03:56 by JohnMcIntosh
Additions:
we and with & MillisecondClockMask (1FFFFFFF)
& with 0x3FFFFFFF
WHY THIS VALUE VERSUS MillisecondClockMask?
Correct solution is to & with MillisecondClockMask at the point were the value is generated, versus relying on caller to & with correct value?
Deletions:
we and with & sMillisecondClockMask
Correct solution is to & with MillisecondClockMask at the point were the value is generated.


Revision [108]

Edited on 2008-10-14 22:54:41 by JohnMcIntosh
Additions:
From sq.h
The primary one, ioMSecs(), is used to implement Delay and Time
millisecondClockValue. The resolution of this clock
determines the resolution of these basic timing functions. For
doing real-time control of music and MIDI, a clock with resolution
down to one millisecond is preferred, but a coarser clock (say,
1/60th second) can be used in a pinch.
The function ioMicroMSecs() is used only to collect timing statistics
for the garbage collector and other VM facilities. (The function
name is meant to suggest that the function is based on a clock
with microsecond accuracy, even though the times it returns are
in units of milliseconds.) This clock must have enough precision to
provide accurate timings, and normally isn't called frequently
enough to slow down the VM. Thus, it can use a more expensive clock
than ioMSecs(). This function is listed in the sqVirtualMachine plugin
support mechanism and thus needs to be a real function, even if a macro is
use to point to it.
There was a third form that used to be used for quickly timing primitives in
order to try to keep millisecond delays up to date. That is no longer used.


Revision [107]

The oldest known version of this page was created on 2008-10-14 22:52:21 by JohnMcIntosh
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki