[Groonga-commit] groonga/groonga [master] fix nsec -> usec conversion for log timestamp.

Back to archive index

null+****@clear***** null+****@clear*****
2011年 2月 2日 (水) 17:34:51 JST


Kouhei Sutou	2011-02-02 08:34:51 +0000 (Wed, 02 Feb 2011)

  New Revision: dbbb944589dc8e329189f9082fa9d833b3d1ec32

  Log:
    fix nsec -> usec conversion for log timestamp.

  Modified files:
    lib/ctx.c

  Modified: lib/ctx.c (+1 -1)
===================================================================
--- lib/ctx.c    2011-02-02 07:20:45 +0000 (3dc608e)
+++ lib/ctx.c    2011-02-02 08:34:51 +0000 (cbbbaa8)
@@ -118,7 +118,7 @@ grn_timeval2str(grn_ctx *ctx, grn_timeval *tv, char *buf)
   snprintf(buf, GRN_TIMEVAL_STR_SIZE - 1, GRN_TIMEVAL_STR_FORMAT,
            ltm->tm_year + 1900, ltm->tm_mon + 1, ltm->tm_mday,
            ltm->tm_hour, ltm->tm_min, ltm->tm_sec,
-           (int)(tv->tv_nsec / GRN_TIME_NSEC_PER_SEC * GRN_TIME_USEC_PER_SEC));
+           (int)(GRN_TIME_NSEC_TO_USEC(tv->tv_nsec)));
   buf[GRN_TIMEVAL_STR_SIZE - 1] = '\0';
   return ctx->rc;
 }




Groonga-commit メーリングリストの案内
Back to archive index