/[grub]/grub2/util/misc.c
ViewVC logotype

Diff of /grub2/util/misc.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.12 by marco_g, Thu Jan 20 17:25:39 2005 UTC revision 1.13 by okuji, Sun Feb 27 21:19:06 2005 UTC
# Line 1  Line 1 
1  /*  /*
2   *  GRUB  --  GRand Unified Bootloader   *  GRUB  --  GRand Unified Bootloader
3   *  Copyright (C) 2002,2003  Free Software Foundation, Inc.   *  Copyright (C) 2002,2003,2005  Free Software Foundation, Inc.
4   *   *
5   *  GRUB is free software; you can redistribute it and/or modify   *  GRUB is free software; you can redistribute it and/or modify
6   *  it under the terms of the GNU General Public License as published by   *  it under the terms of the GNU General Public License as published by
# Line 23  Line 23 
23  #include <string.h>  #include <string.h>
24  #include <sys/types.h>  #include <sys/types.h>
25  #include <sys/stat.h>  #include <sys/stat.h>
26  #include <sys/times.h>  #include <sys/time.h>
27  #include <malloc.h>  #include <malloc.h>
28  #include <unistd.h>  #include <unistd.h>
29    
30  #include <grub/util/misc.h>  #include <grub/util/misc.h>
31  #include <grub/mm.h>  #include <grub/mm.h>
32  #include <grub/term.h>  #include <grub/term.h>
33    #include <grub/machine/time.h>
34    
35  char *progname = 0;  char *progname = 0;
36  int verbosity = 0;  int verbosity = 0;
# Line 256  grub_stop (void) Line 257  grub_stop (void)
257  grub_uint32_t  grub_uint32_t
258  grub_get_rtc (void)  grub_get_rtc (void)
259  {  {
260    struct tms currtime;    struct timeval tv;
261    
262    return times (&currtime);    gettimeofday (&tv, 0);
263      
264      return (tv.tv_sec * GRUB_TICKS_PER_SECOND
265              + (((tv.tv_sec % GRUB_TICKS_PER_SECOND) * 1000000 + tv.tv_usec)
266                 * GRUB_TICKS_PER_SECOND / 1000000));
267  }  }
268    
269  void  void

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26