~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/my_getsystime.c

  • Committer: Monty Taylor
  • Date: 2008-10-16 20:02:16 UTC
  • mfrom: (511.1.9 codestyle)
  • Revision ID: monty@inaugust.com-20081016200216-dvp7f7xx6k5wppkl
MergedĀ fromĀ trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
139
139
    Value in microseconds from some undefined point in time
140
140
*/
141
141
 
142
 
#define DELTA_FOR_SECONDS 500000000LL  /* Half a second */
143
142
 
144
143
uint64_t my_micro_time_and_time(time_t *time_arg)
145
144
{
148
147
    Solaris has a very slow time() call. We optimize this by using the very
149
148
    fast gethrtime() call and only calling time() every 1/2 second
150
149
  */
 
150
 
 
151
#define DELTA_FOR_SECONDS 500000000LL  /* Half a second */
 
152
 
151
153
  static hrtime_t prev_gethrtime= 0;
152
154
  static time_t cur_time= 0;
153
155
  hrtime_t cur_gethrtime;