develooper Front page | perl.perl6.internals | Postings from July 2002

Re: [PATCH] usleep, sleep(num)

Thread Previous
Steve Purkis
July 23, 2002 07:59
Re: [PATCH] usleep, sleep(num)
Message ID:
# sleep.pasm
# Copyright (C) 2002 Steve Purkis. All rights reserved.
# This program is free software. It is subject to the same
# license as The Parrot Interpreter.
# $Id: $

MAIN:	set	I0, 100000
	print	"sleeping for "
	print	I0
	print	" microseconds\n"
	usleep	I0

	print	"sleeping for 999 microseconds (should produce a warning on Win32)\n"
	usleep	999

	print	"sleeping for 1.75 seconds\n"
	time	N0
	sleep	1.75
	time	N1
	sub	N0, N1, N0
	print	"actual time: "
	print	N0
	print	"\n"

	print	"sleeping for 1 second\n"
	sleep	1

	print	"done.\n"


Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About