The Birdfont Source Code


All Repositories / birdfont.git / commitdiff – RSS feed

Write benchmark time to string

These changes was commited to the Birdfont repository Sun, 17 May 2015 21:09:41 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
[Sun, 17 May 2015 21:09:41 +0000]

Updated Files

libbirdfont/Test.vala
--- a/libbirdfont/Test.vala +++ b/libbirdfont/Test.vala @@ -46,15 +46,15 @@ return benchmark; } - public static void print_time (string mess, double start_time) { - double stop_time = GLib.get_real_time (); - stdout.printf (@"$mess $((stop_time - start_time) / 1000000.0)s\n"); + public void print () { + stdout.printf (get_time ()); } - public void print () { - print_time (name, time_stamp); + public string get_time () { + double stop_time = GLib.get_real_time (); + return @"$name $((stop_time - start_time) / 1000000.0)s\n"; } } }