Pleafles 4 лет назад
Родитель
Сommit
06486a7a68
3 измененных файлов с 3 добавлено и 3 удалено
  1. 1 1
      event/hevent.h
  2. 1 1
      event/hloop.c
  3. 1 1
      event/hloop.h

+ 1 - 1
event/hevent.h

@@ -71,7 +71,7 @@ struct htimer_s {
 
 struct htimeout_s {
     HTIMER_FIELDS
-    uint32_t    timeout;                \
+    uint64_t    timeout;                \
 };
 
 struct hperiod_s {

+ 1 - 1
event/hloop.c

@@ -499,7 +499,7 @@ void hidle_del(hidle_t* idle) {
     EVENT_DEL(idle);
 }
 
-htimer_t* htimer_add(hloop_t* loop, htimer_cb cb, uint32_t timeout, uint32_t repeat) {
+htimer_t* htimer_add(hloop_t* loop, htimer_cb cb, uint64_t timeout, uint32_t repeat) {
     if (timeout == 0)   return NULL;
     htimeout_t* timer;
     HV_ALLOC_SIZEOF(timer);

+ 1 - 1
event/hloop.h

@@ -155,7 +155,7 @@ HV_EXPORT void     hidle_del(hidle_t* idle);
 
 // timer
 // @param timeout: unit(ms)
-HV_EXPORT htimer_t* htimer_add(hloop_t* loop, htimer_cb cb, uint32_t timeout, uint32_t repeat DEFAULT(INFINITE));
+HV_EXPORT htimer_t* htimer_add(hloop_t* loop, htimer_cb cb, uint64_t timeout, uint32_t repeat DEFAULT(INFINITE));
 /*
  * minute   hour    day     week    month       cb
  * 0~59     0~23    1~31    0~6     1~12