You can include ctime library and use the difftime() function by providing it two times. one returned before going for input and one immediately after input using time() function which returns current time.
For further info on time library see : http://www.cplusplus.com/reference/ctime/