diff options
| author | Thomas Gellekum <tg@FreeBSD.org> | 2001-05-22 11:33:38 +0000 |
|---|---|---|
| committer | Thomas Gellekum <tg@FreeBSD.org> | 2001-05-22 11:33:38 +0000 |
| commit | 539fbbccc443eb3a84290eff96faaa6b83d8aaa9 (patch) | |
| tree | f3eb6ed35bfe07db51667f466ed3ebaa76b96a13 /usr.bin/doscmd/timer.c | |
| parent | 55426b7d9ead6d7b07f09cd3c3f2f64208df37f0 (diff) | |
Notes
Diffstat (limited to 'usr.bin/doscmd/timer.c')
| -rw-r--r-- | usr.bin/doscmd/timer.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/usr.bin/doscmd/timer.c b/usr.bin/doscmd/timer.c index 41b30199585a..a91c8d106cf2 100644 --- a/usr.bin/doscmd/timer.c +++ b/usr.bin/doscmd/timer.c @@ -8,6 +8,17 @@ static void int08(regcontext_t *REGS) { + struct timeval tv; + time_t tv_sec; + struct timezone tz; + struct tm tm; + + gettimeofday(&tv, &tz); + tv_sec = tv.tv_sec; + tm = *localtime(&tv_sec); + *(u_long *)&BIOSDATA[0x6c] = + (((tm.tm_hour * 60 + tm.tm_min) * 60) + tm.tm_sec) * 182 / 10; + softint(0x1c); } |
