Auto detect activity time frame