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

求助:biostime()

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

使用道具 举报

 楼主| 发表于 2010-8-12 09:26:05 | 显示全部楼层
#include <STDIO.H>
) B3 y4 a  X4 I3 ]# j% l/ F, N#include <BIOS.H>
$ L2 A0 I8 v/ m! Z& y" }#include <TIME.H>
* V9 ~* `+ s& t% K; U: w#include <CONIO.H>3 p* P7 D; H, k- ^. q
int main(void)/ y8 K/ i# G2 g( Y' E1 Y. b
{        long int bios_time;) p1 @+ j& c* c- W5 B
        clrscr();
  j' ]1 c; p: U+ H' t' J$ w& V        cprintf("The number of clock ticks since midnight is:\r\n");
' t) E; o7 D* y4 j; `* `        cprintf("The number of seconds since midnight is:\r\n");
9 e5 T. L7 S7 ~; n% j$ q% b" l        cprintf("The number of minutes since midnight is:\r\n");) W# F! V8 f; F( b0 D
        cprintf("The number of hours since midnight is:\r\n");7 f( K0 ^! ^, T4 t
        textcolor(9);( J& Z5 m. f! Q7 Q& k
        cprintf("\r\nPress any key to quit:");
) \, r+ S# r8 x3 m        textcolor(12);
! Y$ U$ R/ ~- c# c- X# x1 D: ]        while(!kbhit()) {) z1 t" s5 `& C/ H0 ]* r2 J
                bios_time = biostime(0, 0L);) n' _& ^5 F6 r$ t4 P0 H! b( k! p1 d
                gotoxy(50, 1);6 L2 |" H3 I+ Z7 C2 v; s1 V2 w
                cprintf("%lu", bios_time);' }0 K, B6 s3 h) C- e: m( z
                gotoxy(50, 2);7 t  v: ~( U7 y5 [, h/ Z- L/ w# G4 m  j
                cprintf("%.4f", bios_time / CLK_TCK);7 C5 @/ e/ [+ J# n
                gotoxy(50, 3);* S( y$ X5 k- u
                cprintf("%.4f", bios_time / CLK_TCK / 60);
' ~' H3 m: ]7 q4 `+ W# K% U                gotoxy(50, 4);
/ H+ y1 ?; f' v4 o5 c" y                cprintf("%.4f", bios_time / CLK_TCK / 3600);8 E3 v4 x& n9 l8 [; ?
        }% c" b4 _3 W  H1 `' f; ?5 E! h
        return 0;1 Z5 k$ g0 b6 @( G5 g
} - L" X3 ]: y3 ], W  y% T- @/ C

) t" {7 ~* ]" x2 Z( y' I
2 R3 \9 H& b) t3 i0 g- C; \$ L
0 `" r* k) p3 V$ o/ g8 d3 j8 ZTC运行一下,然后把biostime(0,0L)括号里面的数值改掉运行一下,再改回原值,你就知道我问的是什么了,初学,不知道怎么问,见谅。
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-9-1 17:41 , Processed in 2.490158 second(s), 17 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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