[ Return to Bugs & Features | Roadmap 2.0 | Post Text | Post File ]
|Status:||5 - New|
|Priority:||1 - Request for Enhancement, e.g. asking for a feature|
|Scope:||3 - Applies to all machines and operating systems|
|Summary:||Implement when available high resolution timers to get_time_secs()|
Trouble Report Files:
[ Post File ]
Trouble Report Comments:
[ Post Text ]
01:14 May 05, 2006
|Depending on the platform we can use alternative timer services with better resolution |
Roman proposal :
As we only need only relative elapsed time (measuring intervals etc), on windows we can use "multimedia" timer timeGetTime() which - according to MSN - is supported on all platforms from win95 and above. On linux (POSIX?), you can use clock_gettime().
Attached to the STR is some code I use to get elapsed time in seconds. Note that on windows you might want to initialise the timer by a first call to time() at the beginning of the program to to avoid the increase of the uncertainty as the first call (initialisation) can take slightly longer time...
The Roman code attached is just furthered as an example, in particular the real impl will not throw an exceptions and would use GetTickCount if no MM tiler is available.
[ Return to Bugs & Features | Post Text | Post File ]