#include <iostream>
#include <ctime>
using namespace std;

int main()
{
    std::time_t t = std::time(NULL);
    std::tm time_1 = *std::localtime(&t);
    tm time_2 = time_1;

    time_1.tm_hour = 10;
    time_1.tm_min = 4;

    time_2.tm_hour = 11;
    time_2.tm_min = 5;

    std::time_t t1 = mktime(&time_1);
    if ( t1 == -1 )
    {
       cout << "Problem in call to mktime, with time_1\n";
       return 1;
    }

    std::time_t t2 = mktime(&time_2);
    if ( t2 == -1 )
    {
       cout << "Problem in call to mktime, with time_2\n";
       return 1;
    }

    double diff = difftime (t2, t1);

    cout << diff << endl;

    return 0;
}
