CS350 COS
COS
Loading...
Searching...
No Matches
time.c File Reference
#include <stdbool.h>
#include <stdint.h>
#include <sys/kassert.h>
#include <sys/kdebug.h>
#include <sys/ktime.h>
#include <machine/amd64.h>
#include <machine/amd64op.h>
Include dependency graph for time.c:

Go to the source code of this file.

Functions

uint64_t Time_GetTSC ()
 
static void Debug_ReadTSC (int argc, const char *argv[])
 
 REGISTER_DBGCMD (readtsc, "Print current timestamp", Debug_ReadTSC)
 

Function Documentation

◆ Debug_ReadTSC()

static void Debug_ReadTSC ( int  argc,
const char *  argv[] 
)
static

Definition at line 19 of file time.c.

20{
21 kprintf("RDTSC: %lld\n", Time_GetTSC());
22}
int kprintf(const char *fmt,...)
Definition: printf.c:210
uint64_t Time_GetTSC()
Definition: time.c:13
Here is the call graph for this function:

◆ REGISTER_DBGCMD()

REGISTER_DBGCMD ( readtsc  ,
"Print current timestamp"  ,
Debug_ReadTSC   
)

◆ Time_GetTSC()

uint64_t Time_GetTSC ( )

Definition at line 13 of file time.c.

14{
15 return rdtsc();
16}
static INLINE uint64_t rdtsc()
Definition: amd64op.h:39
Here is the call graph for this function:
Here is the caller graph for this function: