#!/usr/bin/perl -w use strict; system("clear"); desperta{ #en: wakeup my $tempo_inicial = time; my $tempo_limite = shift; while (time<($tempo_inicial+$tempo_limite)){ print "Enquanto resta ", -(time-($tempo_inicial+$tempo_limite)), " segundos para acordar, porque não dormes?\n"; #en: 'Why don't you sleep while you have ', time, ' second(s) for that?' my $tempo_inicial_interno = time; while (time<($tempo_inicial_interno+1)){ #não faz nada enquanto não transcorrer 1 segundo #en: waits 1 second }; system("clear"); }; while(1){ $a=1; while($a<1500){ #print $a, "\n"; print "ACORDA "; #en: WAKEUP $a++; } print chr hex 7; }; }; 1;