home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0020 - 0029 / ibm0020-0029 / ibm0028.tar / ibm0028 / GRLF-C-4.ZIP / GSAMP / GSAMP.ZIP / EXAMP16.C < prev    next >
Encoding:
C/C++ Source or Header  |  1989-11-09  |  640 b   |  34 lines

  1. /*
  2.  *  EXAMP16.C
  3.  *
  4.  *  The Greenleaf Comm Library
  5.  *
  6.  *  Copyright (C) 1989 Greenleaf Software Inc.  All Rights Reserved.
  7.  *
  8.  *  This example program demonstrates the use of the asitime() function.
  9.  *
  10.  */
  11. #include <stdio.h>
  12. #include <stdlib.h>
  13. #include "asiports.h"
  14. #include "ibmkeys.h"
  15. #include "gf.h"
  16.  
  17. void main( void );
  18.  
  19. void main()
  20. {
  21.     int last_time;
  22.     int time;
  23.  
  24.     last_time = -1;
  25.     while ( !gfkbhit() ) {
  26.         time = asitime();
  27.         if ( time != last_time )
  28.             printf( "Current seconds count= %d\r", time );
  29.         last_time = time;
  30.     }
  31.     printf( "\n" );
  32.     getkey();
  33. }
  34.