I would like to be able to manipulate fractions of a second, but cannot figure out how to get OOo Basic to handle time vaiables with any more precision than a whole second. Is there a way without having to resort to functions outside of the OOo Basic libraries?
Thanks for any insights . . .
[Solved] Retrieve fractions of a second from time function
[Solved] Retrieve fractions of a second from time function
Last edited by Hagar Delest on Thu Dec 03, 2009 12:21 pm, edited 1 time in total.
Reason: tagged [Solved].
Reason: tagged [Solved].
Nicholas Dreyer
AMD sempron 3.4GHz, 1G RAM, nForce3-250Gb motherboard
AntiX M11
LibreOffice 3.4.3
Posts prior to Aug. 18, 2011 referenced
Linux Debian (lenny-backports or squeeze)
OpenOffice 3.2.1
AMD sempron 3.4GHz, 1G RAM, nForce3-250Gb motherboard
AntiX M11
LibreOffice 3.4.3
Posts prior to Aug. 18, 2011 referenced
Linux Debian (lenny-backports or squeeze)
OpenOffice 3.2.1
-
- Volunteer
- Posts: 1160
- Joined: Mon Oct 08, 2007 1:26 am
- Location: France, Paris area
Re: Can fractions of a second be retrieved from time function?
Hi,
Basic function GetSystemTicks returns the value of a counter of milliseconds. However on an IBM-PC compatible the precision is about 16 milliseconds (because of internal HW clock).
______
Bernard
Basic function GetSystemTicks returns the value of a counter of milliseconds. However on an IBM-PC compatible the precision is about 16 milliseconds (because of internal HW clock).
Code: Select all
Dim t as long
t = GetSystemTicks
' your process here ---
t = GetSystemTicks - t
MsgBox("Duration : " & t)
Bernard
Re: Can fractions of a second be retrieved from time function?
Thanks. That's just what I need. Precsions down to 16 ms not necessary for now, but thanks for the caveat!
NIck
NIck
Nicholas Dreyer
AMD sempron 3.4GHz, 1G RAM, nForce3-250Gb motherboard
AntiX M11
LibreOffice 3.4.3
Posts prior to Aug. 18, 2011 referenced
Linux Debian (lenny-backports or squeeze)
OpenOffice 3.2.1
AMD sempron 3.4GHz, 1G RAM, nForce3-250Gb motherboard
AntiX M11
LibreOffice 3.4.3
Posts prior to Aug. 18, 2011 referenced
Linux Debian (lenny-backports or squeeze)
OpenOffice 3.2.1