diff options
-rw-r--r-- | arts/runtime/artsbuilderloader_impl.cc | 2 | ||||
-rw-r--r-- | kscd/libwm/database.c | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/arts/runtime/artsbuilderloader_impl.cc b/arts/runtime/artsbuilderloader_impl.cc index ee009417..238daae2 100644 --- a/arts/runtime/artsbuilderloader_impl.cc +++ b/arts/runtime/artsbuilderloader_impl.cc @@ -247,7 +247,7 @@ public: if( stat(filename.c_str(), &st) == 0 ) { char mtime[32]; - sprintf(mtime,"[%ld]",st.st_mtime); + snprintf(mtime,sizeof(mtime),"[%.0f]",difftime(st.st_mtime, (time_t)0)); result += filename + mtime; } else diff --git a/kscd/libwm/database.c b/kscd/libwm/database.c index 62d66a32..d9b17d79 100644 --- a/kscd/libwm/database.c +++ b/kscd/libwm/database.c @@ -1107,11 +1107,11 @@ load( void ) /* This is some kind of profiling code. I don't change it to wm_lib_message() for now... */ #ifndef NDEBUG - long t1, t2; + time_t t1, t2; if( getenv( "WORKMAN_DEBUG" ) != NULL ) { time(&t1); - printf("%s (%d): search start = %ld\n", __FILE__, __LINE__, t1); + printf("%s (%d): search start = %.0f\n", __FILE__, __LINE__, difftime(t1, (time_t)0)); fflush(stdout); } #endif @@ -1158,7 +1158,7 @@ load( void ) if( getenv( "WORKMAN_DEBUG" ) != NULL ) { time(&t2); - printf("%s (%d): db search end = %ld, elapsed = %ld\n", __FILE__, __LINE__, t2, t2 - t1); + printf("%s (%d): db search end = %.0f, elapsed = %.0f\n", __FILE__, __LINE__, difftime(t2, (time_t)0), difftime(t2, t1)); fflush(stdout); } #endif @@ -1192,7 +1192,7 @@ load( void ) if( getenv( "WORKMAN_DEBUG" ) != NULL ) { time(&t2); - printf("%s (%d): search end = %ld, elapsed = %ld\n", __FILE__, __LINE__, t2, t2 - t1); + printf("%s (%d): search end = %.0f, elapsed = %.0f\n", __FILE__, __LINE__, difftime(t2, (time_t)0), difftime(t2, t1)); fflush(stdout); } #endif |