]> git.tdb.fi Git - libs/core.git/blobdiff - source/time/unix/utils.cpp
Use nullptr instead of 0 for pointers
[libs/core.git] / source / time / unix / utils.cpp
index 029c75bc3cb26e0bf5bc6929b81fb26d58cb5d93..f25f61c17c03f6ea09c06f4d495ab8c5d021fcaa 100644 (file)
@@ -13,7 +13,7 @@ namespace Time {
 TimeStamp now()
 {
        timeval tv;
-       gettimeofday(&tv, 0);
+       gettimeofday(&tv, nullptr);
        return TimeStamp(timeval_to_rawtime(tv));
 }
 
@@ -27,7 +27,7 @@ TimeDelta get_cpu_time()
 void sleep(const TimeDelta &d)
 {
        timespec ts = rawtime_to_timespec(d.raw());
-       while(nanosleep(&ts, 0)==-1)
+       while(nanosleep(&ts, nullptr)==-1)
                if(errno!=EINTR)
                        throw system_error("nanosleep");
 }