Anonymous user
Nautical bell: Difference between revisions
m
whitespace/tidy up
m (wiki syntax) |
m (whitespace/tidy up) |
||
Line 1:
{{draft task}}
[[Category: Date and time]]▼
The task is to write a small program that emulates a [
The bell timing should be in accordance with [
▲The bell timing should be in accordance with [http://en.wikipedia.org/wiki/GMT Greenwich Mean Time], unless locale dictates otherwise.
It is permissible for the program to [[Run as a daemon|daemonize]], or to slave off a scheduler, and it is permissible to use alternative notification methods (such as producing a written notice "Two Bells Gone"), if these are more usual for the system type.
▲[[Category: Date and time]]
=={{header|D}}==
▲This code uses local time instead of Greenwich Mean Time.
<lang d>import std.stdio, core.thread, std.datetime;
Line 70 ⟶ 65:
=={{header|REXX}}==
The local time is used instead of Greenwich mean time.
<lang rexx>/*REXX pgm sounds "bells" (using PC speaker) when running (perpetually).*/
echo= arg()\==0 /*echo time & bells if any args. */
Line 101 ⟶ 95:
call delay 60 /*ensure don't re-peel.*/
end /*forever*/
halt: /*stick a fork in it, we're done.*/</lang>
'''output''' when using the input of: <tt> the time is: </tt>
<pre>
the time is: 1:48pm
the time is: 1:49pm
|