I've just committed changes/additions to the timing calls in CS. These shouldn't be noticeable to any current applications, but since these changes are in such core components they will likely cause pretty much all of CS to be recompiled. I can't test on Mac OS X, but the original csGetTicks() call was based on gettimeofday() and the changes are as well, so it should be fine. If someone is building on OS X and can confirm that it builds OK after these changes, it would be appreciated.

Additions:

int64 csGetMicroTicks(); This function will return microseconds since the first call to csGetTicks() or csGetMicroTicks(). It's probably not always accurate down to the microsecond, but it should be accurate to a greater level than a millisecond. Like the csGetTicks() function, this function should not be mistaken for the functionality of the virtual clock. At this time the virtual clock does not allow retrieval of time in microseconds, but it could be added simply if it becomes useful.

Changes:

1) The unix csGetTicks() was potentially not threadsafe due to the 'now' variable being declared static. This was probably an entry mistake. In cases where csGetTicks() was called from multiple threads, depending on how gettimeofday() is implemented, it may have resulted in erroneous returns. This is fixed.
2) csGetTicks() calls csGetMicroTicks() for reduction of redundant code.


Andrew/Rhad


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Crystal-main mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/crystal-main
Unsubscribe: mailto:[EMAIL PROTECTED]

Reply via email to