| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Time of last reboot |
Hallo, Carlos!
*** Am 21. Oktober 1996 um 12:18 schrieb Carlos Fernandez Sanz an All:
CFS> How can I determine the time & date of the last system reboot?
=== Cut ===
#define INCL_DOS
#include
int main(int argc, char **argv) {
APIRET apiret;
ULONG *sysinfo;
int rc,i;
int days,hours,mins;
sysinfo=calloc(QSV_MAX,sizeof(ULONG));
rc=DosQuerySysInfo(1,QSV_MAX,sysinfo+1,sizeof(ULONG)*QSV_MAX);
if (rc==0) {
i =sysinfo[QSV_MS_COUNT]/1000;
days =i / 86400;
i -=days*86400;
hours=i / 3600;
i -=hours*3600;
mins =i / 60;
i -=mins*60;
printf("Time since boot from %c: %dd:%dh:%dm:%ds.\n",
(char)((sysinfo[QSV_BOOT_DRIVE] & 0xff)+'A'-1),
days,hours,mins,i);
} /* if */
else
fprintf(stderr,"DosQuerySysInfo rc=%d\n",rc);
return 0;
}
=== Cut ===
Tschau...Thomas
--- E3-32/1.11-32/2.50+
* Origin: Die TeX-Box +49-6034-930021 V.34 -930022 ISDN 24h (2:244/1130.42)SEEN-BY: 50/99 270/101 620/243 625/160 711/401 409 410 413 430 808 809 934 SEEN-BY: 711/955 712/407 515 624 628 713/317 800/1 @PATH: 244/1130 24/999 888 396/1 270/101 712/515 711/808 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.