Skip to content

Instantly share code, notes, and snippets.

@jcbozonier
Forked from anonymous/gist:39145
Created December 22, 2008 22:20
Show Gist options
  • Save jcbozonier/39153 to your computer and use it in GitHub Desktop.
Save jcbozonier/39153 to your computer and use it in GitHub Desktop.
Chad's F#'d
#light
open System
let startTimer minutes checkinterval =
let endtime = DateTime.Now.AddMinutes(minutes) in
let rec interval endtime checkinterval =
if endtime <= DateTime.Now then
System.Console.WriteLine("Timer done")
else
System.Console.WriteLine("checked at " + DateTime.Now.ToShortTimeString())
System.Threading.Thread.Sleep(checkinterval*1000)
interval endtime checkinterval
interval endtime checkinterval
startTimer 1. 1;;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment