[svn:parrot] r40844 - in branches/pluggable_runcore/config/gen/platform: . generic win32

cotto at svn.parrot.org cotto at svn.parrot.org
Fri Aug 28 20:38:59 UTC 2009


Author: cotto
Date: Fri Aug 28 20:38:56 2009
New Revision: 40844
URL: https://trac.parrot.org/parrot/changeset/40844

Log:
[profiling] pick a more descriptive name for a high-resolution timer function

Modified:
   branches/pluggable_runcore/config/gen/platform/generic/hires_timer.c
   branches/pluggable_runcore/config/gen/platform/platform_interface.h
   branches/pluggable_runcore/config/gen/platform/win32/hires_timer.c

Modified: branches/pluggable_runcore/config/gen/platform/generic/hires_timer.c
==============================================================================
--- branches/pluggable_runcore/config/gen/platform/generic/hires_timer.c	Fri Aug 28 20:19:22 2009	(r40843)
+++ branches/pluggable_runcore/config/gen/platform/generic/hires_timer.c	Fri Aug 28 20:38:56 2009	(r40844)
@@ -44,7 +44,7 @@
 
 /*
 
-=item C<UINTVAL Parrot_hires_get_resolution()>
+=item C<UINTVAL Parrot_hires_get_tick_duration()>
 
 Return the number of ns that each time unit from Parrot_hires_get_time represents.
 
@@ -52,11 +52,9 @@
 
 */
 
-UINTVAL Parrot_hires_get_resolution()
+UINTVAL Parrot_hires_get_tick_duration()
 {
-    struct timespec ts;
-    clock_getres(CLOCK_BEST, &ts);
-    return (UINTVAL)TIME_IN_NS(ts);
+    return (UINTVAL) 1;
 }
 
 

Modified: branches/pluggable_runcore/config/gen/platform/platform_interface.h
==============================================================================
--- branches/pluggable_runcore/config/gen/platform/platform_interface.h	Fri Aug 28 20:19:22 2009	(r40843)
+++ branches/pluggable_runcore/config/gen/platform/platform_interface.h	Fri Aug 28 20:38:56 2009	(r40844)
@@ -131,7 +131,7 @@
  */
 
 UHUGEINTVAL Parrot_hires_get_time(void);
-UINTVAL     Parrot_hires_get_resolution(void);
+UINTVAL     Parrot_hires_get_tick_duration(void);
 
 
 struct parrot_string_t;

Modified: branches/pluggable_runcore/config/gen/platform/win32/hires_timer.c
==============================================================================
--- branches/pluggable_runcore/config/gen/platform/win32/hires_timer.c	Fri Aug 28 20:19:22 2009	(r40843)
+++ branches/pluggable_runcore/config/gen/platform/win32/hires_timer.c	Fri Aug 28 20:38:56 2009	(r40844)
@@ -34,7 +34,7 @@
 
 /*
 
-=item C<UINTVAL Parrot_hires_get_resolution()>
+=item C<UINTVAL Parrot_hires_get_tick_duration()>
 
 Return the number of nanoseconds that each time unit from Parrot_hires_get_time represents.
 
@@ -42,7 +42,7 @@
 
 */
 
-UINTVAL Parrot_hires_get_resolution()
+UINTVAL Parrot_hires_get_tick_duration()
 {
     LARGE_INTEGER ticks;
     /* QueryPerformanceCounter returns ticks per second, so divide 1 billion by


More information about the parrot-commits mailing list