home *** CD-ROM | disk | FTP | other *** search
- EXTPROC CEnvi
- /***********************************************************************
- *** OS2Time - CEnvi example program for showing the OS2 system time ***
- *** ver.1 through calls to the system. Note that time could ***
- *** also be obtained more easily through the C-standard ***
- *** library time routines; this example is simply to show ***
- *** how to use some of the more powerful CEnvi features. ***
- ***********************************************************************/
-
- #include <DosCalls.lib> // include the DosGetDateTime() call
-
- printf("Displaying OS/2 system time; press any key to end:\n")
-
- while( !kbhit() ) {
- DosGetDateTime(dt)
- printf("\r%2d:%02d:%02d.%02d",BLObGet(dt,0,UWORD8),BLObGet(dt,1,UWORD8),
- BLObGet(dt,2,UWORD8),BLObGet(dt,3,UWORD8))
- }
-
- while( kbhit() ) getch() // flush keyboard buffer
- printf("\n")
-