home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
405.lha
/
AppleII_Emulators_src
/
src-2
/
ap_rtime.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-06-28
|
714b
|
34 lines
#include <cpu_prog_model.h>
short real_time( type)
short type;
{
/* 17:22:48 */
fortran timdat();
short array [28];
char buffer [16];
static short value [3];
timdat( array, (short) 28);
sprintf( buffer, "%02d %02d %02d", array [3] / 60,
array [3] % 60,
array [4]);
sscanf( buffer, "%02hx %02hx %02hx", &value [0],
&value [1],
&value [2]);
switch (type)
{
case SECOND:
return (value [2]);
case MINUTE:
return (value [1]);
case HOUR:
return (value [0]);
}
}