~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/my_getsystime.c

  • Committer: Monty Taylor
  • Date: 2008-10-13 09:29:43 UTC
  • mfrom: (509 drizzle)
  • mto: (509.1.4 codestyle)
  • mto: This revision was merged to the branch mainline in revision 511.
  • Revision ID: monty@inaugust.com-20081013092943-rwvx4a6d85b5l2dh
MergedĀ inĀ 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 */
142
143
 
143
144
uint64_t my_micro_time_and_time(time_t *time_arg)
144
145
{
147
148
    Solaris has a very slow time() call. We optimize this by using the very
148
149
    fast gethrtime() call and only calling time() every 1/2 second
149
150
  */
150
 
 
151
 
#define DELTA_FOR_SECONDS 500000000LL  /* Half a second */
152
 
 
153
151
  static hrtime_t prev_gethrtime= 0;
154
152
  static time_t cur_time= 0;
155
153
  hrtime_t cur_gethrtime;