home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PsL Monthly 1994 February
/
psl_9403.zip
/
psl_9403
/
DOS
/
UT_SYSTM
/
CENVI2.ZIP
/
OS2TIME.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1993-09-23
|
948b
|
23 lines
EXTPROC CEnvi
/***********************************************************************
*** OS2Time - CEnvi example program for showing the OS2 system time ***
*** 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")