[2013] 2009-03-04 Felix Zielcke <[email protected]>

Felix Zielcke <[email protected]>
Newsgroups gmane.comp.boot-loaders.grub.cvs
Message-ID <[email protected]>
Revision: 2013
          http://svn.sv.gnu.org/viewvc/?view=rev&root=grub&revision=2013
Author:   fzielcke
Date:     2009-03-04 10:25:31 +0000 (Wed, 04 Mar 2009)
Log Message:
-----------
2009-03-04  Felix Zielcke  <[email protected]>

	* util/misc.c: Include <time.h>.
	(grub_millisleep): New function.

Modified Paths:
--------------
    trunk/grub2/util/misc.c

Modified: trunk/grub2/util/misc.c
===================================================================
--- trunk/grub2/util/misc.c	2009-03-04 05:56:31 UTC (rev 2012)
+++ trunk/grub2/util/misc.c	2009-03-04 10:25:31 UTC (rev 2013)
@@ -1,6 +1,6 @@
 /*
  *  GRUB  --  GRand Unified Bootloader
- *  Copyright (C) 2002,2003,2005,2006,2007,2008  Free Software Foundation, Inc.
+ *  Copyright (C) 2002,2003,2005,2006,2007,2008,2009  Free Software Foundation, Inc.
  *
  *  GRUB is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -26,6 +26,7 @@
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <unistd.h>
+#include <time.h>
 
 #include <grub/kernel.h>
 #include <grub/misc.h>
@@ -310,6 +311,16 @@
   return (tv.tv_sec * 1000 + tv.tv_usec / 1000);
 }
 
+void
+grub_millisleep (grub_uint32_t ms)
+{
+  struct timespec ts;
+
+  ts.tv_sec = ms / 1000;
+  ts.tv_nsec = (ms % 1000) * 1000000;
+  nanosleep (&ts, NULL);
+}
+
 void 
 grub_arch_sync_caches (void *address __attribute__ ((unused)),
 		       grub_size_t len __attribute__ ((unused)))
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.