找回密码
 加入计匠网
搜索
热搜: BIOS ACPI CPU Windows
查看: 7147|回复: 2

求助:biostime()

[复制链接]
发表于 2010-8-9 14:04:15 | 显示全部楼层 |阅读模式
这个函数中的biostime(0,0L)被我修改了,结果导致无法读出系统的时间了,读出的全部是零,无论用指令1写任何数据都不会再刷新,是怎么回事?该怎么解决呢,谢谢。
发表于 2010-8-11 12:03:28 | 显示全部楼层
楼主,连问问题都不会问,悲剧呀。。
+ E% x8 M- C! f" B& f有谁搞清楚楼主到底想要表达什么?
回复

使用道具 举报

 楼主| 发表于 2010-8-12 09:26:05 | 显示全部楼层
#include <STDIO.H>0 z5 \9 {& l* _6 G: i0 A
#include <BIOS.H>- n( o! B# j7 n4 {
#include <TIME.H>
4 |( o6 r+ X$ h" v- i' t2 {, A0 D6 `#include <CONIO.H>
: O. D, d' Q, S1 i2 Z) tint main(void)
3 ?. n0 a: ~. V4 d9 n{        long int bios_time;* y4 Y% {3 F- s% x6 b2 x5 F" s8 x
        clrscr();/ I' A4 v% W4 `( U
        cprintf("The number of clock ticks since midnight is:\r\n");
8 ^, \" o: t# Z# l: Q        cprintf("The number of seconds since midnight is:\r\n");/ I! q& S( T7 J
        cprintf("The number of minutes since midnight is:\r\n");
9 ~" g7 P: U$ e3 ]9 v        cprintf("The number of hours since midnight is:\r\n");3 V. N" W& ^+ k9 U. K; e+ B* }6 ?6 c
        textcolor(9);3 H/ [; V: |0 g; }6 X0 x) V
        cprintf("\r\nPress any key to quit:");9 Z/ b0 V# O2 Z8 h" `$ b$ Z; g9 j7 H3 Q5 ?
        textcolor(12);5 s/ t; U' Z1 z6 M
        while(!kbhit()) {
8 U( n/ _3 b3 L: e2 m                bios_time = biostime(0, 0L);
8 J/ t* z1 J5 F6 u4 o2 E; L                gotoxy(50, 1);
3 U+ G- ~' g: {+ d0 l, ^' d4 q                cprintf("%lu", bios_time);- _! X7 r0 k7 U! i$ y( s. A
                gotoxy(50, 2);
4 ?/ H! c. M+ ~' [' H8 K/ {; ]0 u                cprintf("%.4f", bios_time / CLK_TCK);
! `, A% W1 z- X( q3 ^4 H3 p                gotoxy(50, 3);
2 T: s1 {9 o$ E, E3 [0 d                cprintf("%.4f", bios_time / CLK_TCK / 60);$ P) _1 i8 k% v9 l# O8 I
                gotoxy(50, 4);1 \# {4 _% R+ A+ o
                cprintf("%.4f", bios_time / CLK_TCK / 3600);
+ V0 k6 U& H) f& R        }+ w: [; \- G6 w7 j. u4 s/ i& u2 n
        return 0;7 |# U# Z( W! B; t& r( ^. l* |+ f
}   G, Y& ~7 E, {$ e' t$ m' H
$ j# g  p& ?- O( {1 h: H6 q" j3 g
! t7 P; K2 f1 T' K  K

2 U2 Y8 Y& O2 i) mTC运行一下,然后把biostime(0,0L)括号里面的数值改掉运行一下,再改回原值,你就知道我问的是什么了,初学,不知道怎么问,见谅。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 加入计匠网

本版积分规则

Archiver|手机版|小黑屋|计匠网

GMT+8, 2026-3-15 06:47 , Processed in 0.146597 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表