Skip to content

Commit

Permalink
[libtime] fix compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
gozfree committed Nov 21, 2018
1 parent 290f96f commit 5853249
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion autogen_lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ ${S}(TGT_LIB_A): ${S}(OBJS_LIB)
${S}(AR_V) rcs ${S}@ $^
${S}(TGT_LIB_SO): ${S}(OBJS_LIB)
${S}(LD_V) -o ${S}@ $^ ${S}(SHARED)
${S}(CC_V) -o ${S}@ $^ ${S}(SHARED)
@mv ${S}(TGT_LIB_SO) ${S}(TGT_LIB_SO_VER)
@ln -sf ${S}(TGT_LIB_SO_VER) ${S}(TGT_LIB_SO)
Expand Down
4 changes: 2 additions & 2 deletions libtime/libtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,8 @@ int time_set_info(struct time_info *ti)
bool time_passed_sec(int sec)
{
bool ret = false;
static uint32_t last_sec = 0;
static uint32_t now_sec = 0;
static uint64_t last_sec = 0;
static uint64_t now_sec = 0;
now_sec = time_get_sec();
if (last_sec == 0) {
last_sec = now_sec;
Expand Down
2 changes: 1 addition & 1 deletion libtime/test_libtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ void foo()
char time[32];
printf("time_get_sec_str: %s", time_get_sec_str());
printf("time_get_msec_str: %s\n", time_get_msec_str(time, sizeof(time)));
printf("time_get_sec: %" PRIu32 "\n", time_get_sec());
printf("time_get_sec: %" PRIu64 "\n", time_get_sec());
printf("time_get_msec: %" PRIu64 "\n", time_get_msec());
printf("time_get_msec: %" PRIu64 "\n", time_get_usec()/1000);
printf("time_get_usec: %" PRIu64 "\n", time_get_usec());
Expand Down

0 comments on commit 5853249

Please sign in to comment.