// // Created by logicp on 4/22/17. // #include #include #include #include #include "drone.h" drone::drone() {} drone::drone(int payload) { payload = payload; } int drone::explore() { std::time_t startTime = std::time(nullptr); std::time_t currentTime; int explore_time; double seconds; std::cout << "Input explore duration for drone mission: " << std::endl; std::cin >> explore_time; std::time(¤tTime); //get the time now that the user has entered something and stick it in currentTime seconds = std::difftime(currentTime, startTime); std::cout << "It took you " << seconds << " seconds to enter something.\n"; std::cout << "Input something else..."; std::cin.ignore(std::numeric_limits::max(), '\n'); std::time(¤tTime); seconds = std::difftime(currentTime, startTime); std::cout << "It has now been " << seconds << " seconds since you started the program.\n"; return 69; }