On Wed, Apr 19, 2017 at 10:57:28AM +0100, Richard W.M. Jones wrote:
+ struct timespec t;
+#define NANOSLEEP(ns) do { \
+ t.tv_sec = delay_ns / 1000000000; \
+ t.tv_nsec = delay_ns % 1000000000; \
+ nanosleep (&t, NULL); \
+ } while(0)
+
Defining 't' outside its context is a bit clumsy. See attached
version of 3/3 which fixes this.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW