27 minutes ago, phil67rpg said:I get an error with the minus sign(-) no operand matches these operators
You're going to have to provide more information about the actual code you wrote, and the exact text of the error, if anybody's going to be able to help you with that. If you are using chrono like I suggested, you should look at the example code for now() usage.
You can subtract two time_point's, which is what now() returns, and you'll get a duration. It's possible you aren't including the correct headers to use those types. Or it's also possible your compiler doesn't support C++11, in which case unfortunately chrono won't be available to you and you'll have to use something platform-specific like QueryPerformanceCounter on Windows.