Преглед изворни кода

Use _starpu_sleep instead of usleep

Samuel Thibault пре 11 година
родитељ
комит
fbcff3ec64
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.
  *
- * Copyright (C) 2009-2012  Université de Bordeaux 1
+ * Copyright (C) 2009-2012, 2014  Université de Bordeaux 1
  * Copyright (C) 2010, 2011, 2012  Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -143,10 +143,11 @@ void _starpu_timing_init(void)
 
 	{
 		struct timeval tv1,tv2;
+		struct timespec ts = { .tv_sec = 0, .tv_nsec = 500000000UL };
 
 		STARPU_GET_TICK(t1);
 		gettimeofday(&tv1,0);
-		usleep(500000);
+		_starpu_sleep((&ts);
 		STARPU_GET_TICK(t2);
 		gettimeofday(&tv2,0);
 		_starpu_scale = ((tv2.tv_sec*1e6 + tv2.tv_usec) -