#include "drv_types.h" #include "hdmi_time.h" #include // timer #include /* in_interrupt() */ #include void HDMI_DelayMs(UINT32 x) { if(in_atomic()) { mdelay(x); } else { msleep(x); } } void HDMI_DelayUs(UINT32 x) { udelay(x); } //------------------------------------------------------------------------------ // Function: HDMI_GetSysTime // Description: Returns the current number of system ticks since we started (unit:1ms) // Parameters: None // Returns: the current number of system ticks since we started (unit:1ms) //------------------------------------------------------------------------------ UINT32 HDMI_GetSysTime(void) { struct timespec now; getnstimeofday(&now); return(now.tv_sec*1000) +(now.tv_nsec/1000000); //transfer to minisecond }