#include <stdio.h>
#include <bios.h>
#include <time.h>
#include <conio.h>
int main( void )
{
long bios_time;
clrscr();
cprintf( "The number of clock ticks since midnight is:\r\n" );
cprintf( "The number of seconds since midnight is:\r\n" );
cprintf( "The number of minutes since midnight is:\r\n" );
cprintf( "The number of hours since midnight is:\r\n" );
cprintf( "\r\nPress any key to quit:" );
while ( !kbhit() )
{
bios_time = biostime( 0, 0L );
gotoxy( 50, 1 );
cprintf( "%lu", bios_time );
gotoxy( 50, 2 );
cprintf( "%.4f", bios_time / CLK_TCK );
gotoxy( 50, 3 );
cprintf( "%.4f", bios_time / CLK_TCK / 60 );
gotoxy( 50, 4 );
cprintf( "%.4f", bios_time / CLK_TCK / 3600 );
}
return(0);
}
读取或设置BIOS时间
原创
©著作权归作者所有:来自51CTO博客作者mb643d15e043b20的原创作品,请联系作者获取转载授权,否则将追究法律责任
上一篇:动图
下一篇:MidpointCircle

提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章