1 2(********************************************************************) 3(* *) 4(* clock2.sd7 Displays a digital clock with microseconds *) 5(* Copyright (C) 1992, 1993, 1994, 2004 Thomas Mertes *) 6(* *) 7(* This program is free software; you can redistribute it and/or *) 8(* modify it under the terms of the GNU General Public License as *) 9(* published by the Free Software Foundation; either version 2 of *) 10(* the License, or (at your option) any later version. *) 11(* *) 12(* This program is distributed in the hope that it will be useful, *) 13(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) 14(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) 15(* GNU General Public License for more details. *) 16(* *) 17(* You should have received a copy of the GNU General Public *) 18(* License along with this program; if not, write to the *) 19(* Free Software Foundation, Inc., 51 Franklin Street, *) 20(* Fifth Floor, Boston, MA 02110-1301, USA. *) 21(* *) 22(********************************************************************) 23 24 25$ include "seed7_05.s7i"; 26 include "stdio.s7i"; 27 include "time.s7i"; 28 include "keybd.s7i"; 29 30var time: last_time is time.value; 31 32const proc: main is func 33 begin 34 writeln; 35 while busy_getc(KEYBOARD) = KEY_NONE do 36 last_time := time(NOW); 37 write(last_time <& "\r"); 38 flush(OUT); 39 end while; 40 writeln; 41 writeln; 42 end func; 43