Added management of timeout and related functionnality

Signed-off-by: Thibaut Quentin <thibaut.quentin@laposte.net>