⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 b_time.gml

📁 开放源码的编译器open watcom 1.6.0版的源代码
💻 GML
字号:
.func _bios_timeofday
#include <bios.h>
int _bios_timeofday( int service, long *timeval );
.ixfunc2 '&BiosFunc' &func
.funcend
.desc begin
The &func function uses INT 0x1A to get or set the current
system clock value.
The values for service are:
.begterm 12
.termhd1 Value
.termhd2 Meaning
.term _TIME_GETCLOCK
Places the current system clock value in the location pointed to by
.arg timeval.
The function returns zero
if midnight has not passed since the last time the system clock was
read or set; otherwise, it returns 1.
.term _TIME_SETCLOCK
Sets the system clock to the value in the location pointed to by
.arg timeval.
.endterm
.desc end
.return begin
A value of -1 is returned if neither _TIME_GETCLOCK nor _TIME_SETCLOCK
were specified; otherwise 0 is returned.
.return end
.exmp begin
#include <stdio.h>
#include <bios.h>

void main()
  {
    long time_of_day;
.exmp break
    _bios_timeofday( _TIME_GETCLOCK, &time_of_day );
    printf( "Ticks since midnight: %lu\n", time_of_day );
  }
.exmp output
Ticks since midnight: 762717
.exmp end
.class BIOS
.system

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -