set flag on alarm function
use constant for interval
add move functions
pass struct by reference
move to separated files
Merge pull request #2 from adrianob/alarm_flag

set flag on alarm function