/* Simple timer for COMP2100
   Richard Walker, 2005
   $Revision: 1.3 $
   $Date: 2005/05/22 08:00:33 $ */

#include <jni.h>
#include <time.h>
#include "Timer.h"

/* The external C part of a Java system stopwatch package */

JNIEXPORT jint JNICALL Java_Timer_ticks (JNIEnv *env,
                                         jobject obj) {
  return (jint) clock();
}

JNIEXPORT jint JNICALL Java_Timer_ticksPerSecond (JNIEnv *env,
                                                  jobject obj) {
  return (jint) CLOCKS_PER_SEC;
}

