The Birdfont Source Code


All Repositories / birdfont.git / commit – 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
author Johan Mattsson <johan.mattsson.m@gmail.com>
Sun, 17 May 2015 21:09:41 +0000 (23:09 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Sun, 17 May 2015 21:09:41 +0000 (23:09 +0200)
commit dd7c7263ba49528431aebd8bb14d255d02a97031
tree 08a0e4663e2b1a5848ba3f3ab795ed2aa38cfd2f
parent 18570819dfa958c49956954a56c40cbb17c423fb
Write benchmark time to string

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"; } } }