0 Replies - 996 Views - Last Post: 12 January 2010 - 02:14 PM

#1 athlon32  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 117
  • View blog
  • Posts: 363
  • Joined: 20-August 08

Vala - Timer Example

Posted 12 January 2010 - 02:14 PM

Description: Demonstrates using the Glib.Timer class in Vala
using GLib;

class time_class : GLib.Object {
    public static int main(string[] args) {
	Timer timer = new Timer();
	timer.start();
	
	stdout.printf("The program will close in three secondsn");

	for(double x = 0.0; x <= 3.0;) {
	     x = timer.elapsed();
	}		
	timer.stop();
	return 0;
   }
}

Is This A Good Question/Topic? 0
  • +

Page 1 of 1