time_utils.h

来自「话带数据中传真解调程序」· C头文件 代码 · 共 64 行

H
64
字号
/*
 *
 *	Lucent PCI modem diagnostics tool.
 *
 *	Copyright (c) 1999 Richard J.M. Close
 *
 *	Can be freely distributed and used under the terms of the GNU GPL.
 */

#ifndef LT_TIME_H

#define LT_TIME_H 1

#include <time.h>
#include <unistd.h>
#include <sys/io.h>
#include <sys/time.h>
#include <stdio.h>

#include "stdbool.h"
#include "modem_globals.h"
#include "homol.h"
#include "irq.h"
#include "portIO.h"

#define SLOW_TIMER 1

// For compatibity with jamie's stuff.
#define START_TIMER(timer)   ((timer) = x_current_time ())
#define ELAPSED_TIME(timer) (x_elapsed_time (timer))

// Timer variables.
bool VMODEM_Timer_Active;
bool timer_set;
bool timer_stop;

unsigned int Sec_mult, mSec_div;

// Time related routines.

unsigned short x_current_time(void);

unsigned int VMODEM_Get_System_Time(void);

unsigned short x_elapsed_time(unsigned short from);

unsigned int x_elapsed_time_long(unsigned int from);

unsigned int x_elapsed_long_time (struct lt_timer* long_timer_ptr);

void x_sleep(int howlong);

void wait_for_core_read(void);

void x_wakeup (void);

void VMODEM_Start_Timer(int arg);

void x_set_current_time(struct lt_timer* time_ptr);

unsigned short x_elapsed_minutes(struct lt_timer* time_ptr);

#endif

⌨️ 快捷键说明

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