~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/my_getsystime.cc

  • Committer: Monty Taylor
  • Date: 2008-12-17 18:23:08 UTC
  • mfrom: (685.3.3 mysys-slimdown)
  • mto: This revision was merged to the branch mainline in revision 713.
  • Revision ID: monty@inaugust.com-20081217182308-bcuztplharskm9yh
MergedĀ fromĀ Toru.

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
#endif
51
51
}
52
52
 
53
 
 
54
 
/*
55
 
  Return current time
56
 
 
57
 
  SYNOPSIS
58
 
    my_time()
59
 
    flags       If MY_WME is set, write error if time call fails
60
 
 
61
 
*/
62
 
 
63
 
time_t my_time(myf flags)
64
 
{
65
 
  time_t t;
66
 
#ifdef HAVE_GETHRTIME
67
 
  (void)flags;
68
 
  (void) my_micro_time_and_time(&t);
69
 
  return t;
70
 
#else
71
 
  /* The following loop is here beacuse time() may fail on some systems */
72
 
  while ((t= time(0)) == (time_t) -1)
73
 
  {
74
 
    if (flags & MY_WME)
75
 
      fprintf(stderr, "%s: Warning: time() call failed\n", my_progname);
76
 
  }
77
 
  return t;
78
 
#endif
79
 
}
80
 
 
81
 
 
82
53
/*
83
54
  Return time in micro seconds
84
55