added timer and fixed semaphore bug

Signed-off-by: unknown <boris@boris-PC2.gspaces.com>