~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
JACK/jack/time.h


** Warning: Cannot open xref database.

1 /* 2 Copyright (C) 2001-2003 Paul Davis 3 4 This program is free software; you can redistribute it and/or modify 5 it under the terms of the GNU Lesser General Public License as published by 6 the Free Software Foundation; either version 2.1 of the License, or 7 (at your option) any later version. 8 9 This program is distributed in the hope that it will be useful, 10 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 GNU Lesser General Public License for more details. 13 14 You should have received a copy of the GNU Lesser General Public License 15 along with this program; if not, write to the Free Software 16 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 18 $Id: time.h,v 1.3 2003/06/16 22:38:16 trutkin Exp $ 19 */ 20 21 #ifndef __jack_time_h__ 22 #define __jack_time_h__ 23 24 #include <jack/types.h> 25 26 extern void jack_init_time (); 27 28 #if defined(__APPLE__) && defined(__POWERPC__) 29 30 #include <mach/mach_time.h> 31 32 extern double __jack_time_ratio; 33 34 static inline jack_time_t jack_get_microseconds(void) 35 { 36 return mach_absolute_time () * __jack_time_ratio; 37 } 38 39 #else 40 41 #include <jack/cycles.h> 42 43 extern jack_time_t __jack_cpu_mhz; 44 extern jack_time_t jack_get_mhz(); 45 extern void jack_init_time (); 46 47 static inline jack_time_t jack_get_microseconds (void) { 48 return get_cycles() / __jack_cpu_mhz; 49 } 50 51 #endif 52 53 #endif /* __jack_time_h__ */ 54

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.