Reading the time from the keyboard as 3 int values should work. I don't know if that's the "best way," but it's a way and might provide the quickest starting point from which to do the difference...