#include <time.h>
#include <types.h>
...
time_t timeNow;
u_int32 ticks;
u_int32 hundredths;
error = _os_getime (&timeNow, &ticks);
/* ticks contains the ticks per second in the MS 16 bits, the number of
ticks THIS second in the LS 16 bits */
/* So, assuming a 100Hz ticker.. Otherwise, do your own thing. */ hundredths = ticks & 0xffff ;
wegie wrote in message <62075fc3.0108030552.28e99b36@posting.google.com>... >Can anyone please tell me how I can get the system time
including milliseconds on OS9?
10 millisecond resolution would suffice.
Cheers
Wegie
On Friday, 3 August 2001 16:36:07 UTC+2, Peter Seed wrote:
#include <time.h>
#include <types.h>
...
time_t timeNow;
u_int32 ticks;
u_int32 hundredths;
error = _os_getime (&timeNow, &ticks);
/* ticks contains the ticks per second in the MS 16 bits, the number
of ticks THIS second in the LS 16 bits */
/* So, assuming a 100Hz ticker.. Otherwise, do your own thing. */
hundredths = ticks & 0xffff ;
wegie wrote in message
<62075fc3.0108030552.28e99b36@posting.google.com>...
Can anyone please tell me how I can get the system time
including milliseconds on OS9?
10 millisecond resolution would suffice.
Cheers
Wegie
what is the type of error here??
On Friday, 3 August 2001 16:36:07 UTC+2, Peter Seed wrote:
#include <time.h>
#include <types.h>
error = _os_getime (&timeNow, &ticks);
what is the type of error here??
On Friday, 3 August 2001 16:36:07 UTC+2, Peter Seed wrote:
#include <time.h>
#include <types.h>
...
time_t timeNow;
u_int32 ticks;
u_int32 hundredths;
error = _os_getime (&timeNow, &ticks);
/* ticks contains the ticks per second in the MS 16 bits, the number
of ticks THIS second in the LS 16 bits */
/* So, assuming a 100Hz ticker.. Otherwise, do your own thing. */
hundredths = ticks & 0xffff ;
wegie wrote in message
Can anyone please tell me how I can get the system time
including milliseconds on OS9?
10 millisecond resolution would suffice.
Cheers
Wegie
what is the type of error here??
Which verison of OS-9 ? Which CPU ?
---
This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 365 |
Nodes: | 16 (2 / 14) |
Uptime: | 01:22:13 |
Calls: | 7,795 |
Calls today: | 5 |
Files: | 12,920 |
Messages: | 5,748,963 |