4 * The geeky little puzzle game with a big noodly crunch!
6 * gPlanarity copyright (C) 2005 Monty <monty@xiph.org>
7 * Original Flash game by John Tantalo <john.tantalo@case.edu>
8 * Original game concept by Mary Radcliffe
10 * gPlanarity is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2, or (at your option)
15 * gPlanarity is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with Postfish; see the file COPYING. If not, write to the
22 * Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
32 static time_t begin_time_add
;
33 static time_t begin_time
;
34 static char timebuffer
[160];
38 return begin_time_add
;
40 time_t ret
= time(NULL
);
41 return ret
- begin_time
+ begin_time_add
;
45 char *get_timer_string(){
46 int ho
= get_timer() / 3600;
47 int mi
= get_timer() / 60 - ho
*60;
48 int se
= get_timer() - ho
*3600 - mi
*60;
51 snprintf(timebuffer
,160,_("%d:%02d:%02d"),ho
,mi
,se
);
53 snprintf(timebuffer
,160,_("%d:%02d"),mi
,se
);
55 snprintf(timebuffer
,160,_("%d seconds"),se
);
61 void set_timer(time_t off
){
63 begin_time
= time(NULL
);
67 begin_time_add
= get_timer();
73 set_timer(begin_time_add
);