Skip to content

Instantly share code, notes, and snippets.

@esad
Created March 28, 2015 21:32
Show Gist options
  • Save esad/11a4bc8b5158bb04e2d5 to your computer and use it in GitHub Desktop.
Save esad/11a4bc8b5158bb04e2d5 to your computer and use it in GitHub Desktop.
fuzz.pl
use_module(library(date)).
event(asleep).
event(wokeup).
eventdb(Ts,X,I) :- event(X), call(X,Y), parse_time(Y,Ts), aggregate(min(IArg), eventdb(_,_,IArg), IMin), I=IMin+1.
asleep('2015-03-28 23:00').
asleep('2015-03-28 22:00').
wokeup('2015-03-28 02:00').
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment