MIPS/resources/soft/memory_game/include/time.h
Paul Pan 7b33e4213a a big update
1. add test soft
2. modify verilator (TODO: crossbar need to replace)
3. fix CP0: now CU0 is always 1
4. Controller: cacheop
5. Controller: fix TEN
6. mycpu_top fix CP0_i
7. fix AXI.sv
8. fix AXIReader.sv
9. fix AXIWriter.sv: getting the correct data and length
10. MU: fix cache writeback, fix mem data mux, fix writer address, fix read request
2022-07-29 18:25:58 +08:00

47 lines
768 B
C

#ifndef _TIME_H_H
#define _TIME_H_H
typedef unsigned long _clock_t;
typedef unsigned long clock_t;
#define MSEC_PER_SEC 1000L
#define USEC_PER_MSEC 1000L
#define NSEC_PER_USEC 1000L
#define NSEC_PER_MSEC 1000000L
#define USEC_PER_SEC 1000000L
#define NSEC_PER_SEC 1000000000L
#define FSEC_PER_SEC 1000000000000000LL
struct tms{
_clock_t tms_utime;
_clock_t tms_stime;
_clock_t tms_cutime;
_clock_t tms_cstime;
};
struct tm{
int tm_sec;
int tm_min;
int tm_hour;
int tm_mday;
int tm_mon;
int tm_year;
int tm_wday;
int tm_yday;
};
struct timespec{
_clock_t tv_sec;
_clock_t tv_nsec;
_clock_t tv_usec;
_clock_t tv_msec;
};
struct timeval{
_clock_t tv_sec;
_clock_t tv_nsec;
_clock_t tv_usec;
_clock_t tv_msec;
};
unsigned long get_count();
#endif