/***************************************************************
 * PrUtility.h
 *
 * This class provides utility methods.
 *
 ****************************************************************/

/*
 * modification history
 *----------------------
 *
 * 11/02/97: K.C. Chang: created.
 */

#ifndef _PrUtility_h
#define _PrUtility_h

#include "PrGlobalDefn.h"

#define PR_UTILITY_OK    1
#define PR_UTILITY_ERROR 0

class PrUtility
{
  public:
    PrUtility() {}
    ~PrUtility() {}

    // set the timer resolution of OS
    double resolution(double period);

    // returns the global time in sec since 1/1/1970
    double time();

    // blocks current process for miliSec
    int miliBlock(long miliSec);

    // blocks current process for microSec
    int microBlock(long microSec);

    // blocks current process for nanoSec
    int nanoBlock(long nanoSec);

  private:
    // copy is not allowed
    PrUtility(const PrUtility &) {}
};


#endif // _PrUtility_h
