# ********** SingletonDemo.pl ***********
use strict;
use Singleton;
use Time::HR;

my $t1 = gethrtime();
my $i;
for ($i=0; $i<50000000; $i++) {
  my $instance = Singleton->new;
  $instance->setValue($i);
}
my $t2 = gethrtime();
print (int(($t2-$t1)/1000000))." ";
