/****************************************************************************/
/* Copyright (c) 2000 MBARI                                                 */
/* MBARI Proprietary Information. All rights reserved.                      */
/****************************************************************************/
/* Summary  :                                                               */
/* Filename : getClockRes.cc                                                */
/* Author   :                                                               */
/* Project  :                                                               */
/* Version  : 1.0                                                           */
/* Created  : 02/07/2000                                                    */
/* Modified :                                                               */
/* Archived :                                                               */
/****************************************************************************/
/* Modification History:                                                    */
/****************************************************************************/
#include <stdio.h>
#include <time.h>
#include <errno.h>
#include "TimeP.h"

int main(int argc, char **argv)
{
  struct timespec resolution;

  if (clock_getres(CLOCK_REALTIME, &resolution) == -1) {
    perror("clock_getres()");
    return 1;
  }
  else {
    printf("Resolution: %d millisec (%.4f sec)\n",
	   (int )(Time::seconds(&resolution) * 1000 + 0.5),
	   Time::seconds(&resolution));

    return 0;
  }
}

