simplified time detection