Added features to timer.c, improved example