home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 1995 September / PCPRO2_995.ISO / virtek / dos / libex / libex050.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-16  |  655 b   |  18 lines

  1.                           // Example: 050 from Library Reference
  2. #include "..\3D-Ware\dddware.h"
  3. #include  <stdio.h>
  4. long    ticks;
  5. short  main(void)
  6. {
  7.   dddInitKeybd();         // Initialise the 3D-Ware Keyboard handler.
  8.   while  (!dddkeycode)       // Run until a key is pressed.
  9.   {
  10.     ticks = dddGeticks(); // Request the current ticks value.
  11.     printf("Current ticks val is :- %ld, seconds is :- %ld\n",ticks, ticks/18);
  12.                           // Print the current value and also print the value
  13.                           // divided by 18 to give us a seconds value.
  14.   }
  15.   dddRestoreKeybd();
  16.   return 0;               // Bye.
  17. }
  18.