home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 2 BBS
/
02-BBS.zip
/
MNUM416D.SZH
/
DOSTIME.C
< prev
next >
Wrap
Text File
|
1991-03-24
|
820b
|
31 lines
/* By Peter Fitzsimmons, from his BinkleyTerm Port */
#include <stdio.h>
#ifndef OS_2
#error This Module only for OS/2
#endif
#define INCL_DOSDATETIME
#include <os2.h>
void dostime(int *hour, int *min, int *sec, int *hdths)
{
DATETIME dt;
DosGetDateTime(&dt);
*hour = dt.hours; /* current hour */
*min = dt.minutes; /* current minute */
*sec = dt.seconds; /* current second */
*hdths = dt.hundredths; /* current hundredths of a second */
}
void dosdate(int *month, int *mday, int *year, int *weekday)
{
DATETIME dt;
DosGetDateTime(&dt);
*mday = dt.day; /* current day */
*month = dt.month; /* current month */
*year = dt.year; /* current year */
*weekday = dt.weekday; /* current day of week */
}