FLTK logo

STR #1262

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  |  Screenshots  ]
 

Return to Bugs & Features | Roadmap 2.0 | Post Text | Post File | SVN ⇄ GIT ]

STR #1262

Application:FLTK Library
Status:5 - New
Priority:1 - Request for Enhancement, e.g. asking for a feature
Scope:3 - Applies to all machines and operating systems
Subsystem:Core Library
Summary:Implement when available high resolution timers to get_time_secs()
Version:2.0-feature
Created By:fabien
Assigned To:Unassigned
Fix Version:Unassigned
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:

Post File ]
Name/Time/Date Filename/Size  
 
#1 fabien
01:14 May 05, 2006
RomanTimerproposalUse.cxx
1k
 
     

Trouble Report Comments:

Post Text ]
Name/Time/Date Text  
 
#1 fabien
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...

Roman

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 ]

 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.