-
-
Save jcbozonier/39153 to your computer and use it in GitHub Desktop.
Chad's F#'d
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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