Original author: Pierre Sarrazin. Public-domain library and demo. Source: http://sarrazip.com/dev/cardgame-0.1.15.tar.gz Archive SHA-256: ca706dddd96fec63b829f8958c2e47485b0e1166129d45fda0b6369404c1bb54
30 lines
559 B
C
30 lines
559 B
C
#include "cardgame.h"
|
|
|
|
|
|
int main()
|
|
{
|
|
byte err = OS9Timer_init(1); // increment a counter at every 60 Hz tick
|
|
if (err != 0)
|
|
{
|
|
printf("Failed to init OS-9 timer: error #%u\n", err);
|
|
return 1;
|
|
}
|
|
|
|
word seconds;
|
|
do
|
|
{
|
|
word t = OS9Timer_getTimer();
|
|
seconds = t / 60;
|
|
printf("%5u ticks, %4u s\n", t, seconds);
|
|
} while (seconds < 5);
|
|
|
|
err = OS9Timer_shutdown();
|
|
if (err != 0)
|
|
{
|
|
printf("Failed to close OS-9 timer: error #%u\n", err);
|
|
return 1;
|
|
}
|
|
|
|
return 0;
|
|
}
|