From 8dbec761cf858ea65900c8a094599857208d8c3a Mon Sep 17 00:00:00 2001 From: "N.N." Date: Tue, 5 Jan 2010 22:49:36 +0000 Subject: svn path=/trunk/; revision=12907 --- desiredata/portmidi_osx/ptdarwin.c | 58 -------------------------------------- 1 file changed, 58 deletions(-) delete mode 100644 desiredata/portmidi_osx/ptdarwin.c (limited to 'desiredata/portmidi_osx/ptdarwin.c') diff --git a/desiredata/portmidi_osx/ptdarwin.c b/desiredata/portmidi_osx/ptdarwin.c deleted file mode 100644 index de71d03b..00000000 --- a/desiredata/portmidi_osx/ptdarwin.c +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Portable timer implementation for Darwin / MacOS X - * - * Jon Parise - * - * $Id: ptdarwin.c,v 1.9.2.2 2005-07-12 15:53:50 timblech Exp $ - */ - -#include -#include -#include "porttime.h" - -#define TRUE 1 -#define FALSE 0 - -static int time_started_flag = FALSE; -static struct timeval time_offset; - -PtError Pt_Start(int resolution, PtCallback *callback, void *userData) -{ - struct timezone tz; - - if (callback) printf("error in porttime: callbacks not implemented\n"); - time_started_flag = TRUE; - gettimeofday(&time_offset, &tz); - - return ptNoError; -} - - -PtError Pt_Stop(void) // xjs added void -{ - time_started_flag = FALSE; - return ptNoError; -} - - -int Pt_Started(void) // xjs added void -{ - return time_started_flag; -} - - -PtTimestamp Pt_Time(void *time_info) // xjs added void *time_info -{ - long seconds, milliseconds; - struct timeval now; - struct timezone tz; - - gettimeofday(&now, &tz); - seconds = now.tv_sec - time_offset.tv_sec; - milliseconds = (now.tv_usec - time_offset.tv_usec) / 1000; - - return (seconds * 1000 + milliseconds); -} - - - -- cgit v1.2.1