home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
cenvi23.zip
/
OS2TIME.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-03-28
|
950b
|
23 lines
EXTPROC CEnvi2
/***********************************************************************
*** OS2Time - CEnvi2 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 CEnvi2 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")