ithewei 6 년 전
부모
커밋
3e790590b8
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      htime.h

+ 6 - 0
htime.h

@@ -29,6 +29,7 @@ inline void msleep(unsigned int ms) {
 #endif
 }
 
+// ms
 inline unsigned int gettick() {
 #ifdef OS_WIN
     return GetTickCount();
@@ -39,6 +40,11 @@ inline unsigned int gettick() {
 #endif
 }
 
+// us
+inline unsigned int getclock() {
+    return clock()*(unsigned long long)1000000 / CLOCKS_PER_SEC;
+}
+
 int month_atoi(const char* month);
 const char* month_itoa(int month);