瀏覽代碼

Fix build when clock_gettime is not available

Samuel Thibault 6 年之前
父節點
當前提交
32de259899
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      src/common/timing.c

+ 3 - 2
src/common/timing.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
- * Copyright (C) 2008-2012,2014-2017                      Université de Bordeaux
+ * Copyright (C) 2008-2012,2014-2017,2019                 Université de Bordeaux
  * Copyright (C) 2010-2012,2015,2017                      CNRS
  * Copyright (C) 2010-2012,2015,2017                      CNRS
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * StarPU is free software; you can redistribute it and/or modify
@@ -220,7 +220,8 @@ void _starpu_timing_init(void)
 
 
 void _starpu_clock_gettime(struct timespec *ts)
 void _starpu_clock_gettime(struct timespec *ts)
 {
 {
-	timerclear(ts);
+	ts->tv_sec = 0;
+	ts->tv_nsec = 0;
 }
 }
 #endif
 #endif
 #endif // HAVE_CLOCK_GETTIME
 #endif // HAVE_CLOCK_GETTIME