~kgunn72/mir/dont-crash-when-shooting-invalid-surface

« back to all changes in this revision

Viewing changes to tests/mir_test_framework/socket_detect_server.cpp

  • Committer: Tarmac
  • Author(s): Alan Griffiths, Alexandros Frantzis, Daniel van Vugt, Kevin DuBois, Christopher James Halse Rogers, chris.gagnon, Mathieu Trudel-Lapierre, Robert Carr, Automatic PS uploader, Kevin Gunn, Daniel d'Andrada, Christopher James Halse Rogers, Michael Terry, Brandon Schaefer, Timo Jyrinki, Mir Team, Andreas Pokorny
  • Date: 2013-12-20 11:11:22 UTC
  • mfrom: (1169.1.1 version-0.1.3)
  • Revision ID: tarmac-20131220111122-h503fd1fnq7pn9za
Latest upstream release: Mir 0.1.3 (r1298).

Approved by Alan Griffiths, PS Jenkins bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
    std::string const& socket_file,
31
31
    std::chrono::milliseconds const& timeout)
32
32
{
33
 
    auto limit = std::chrono::system_clock::now() + timeout;
 
33
    auto limit = std::chrono::steady_clock::now() + timeout;
34
34
 
35
35
    bool error = false;
36
36
    struct stat file_status;
43
43
        }
44
44
        error = stat(socket_file.c_str(), &file_status);
45
45
    }
46
 
    while (error && std::chrono::system_clock::now() < limit);
 
46
    while (error && std::chrono::steady_clock::now() < limit);
47
47
 
48
48
    return !error;
49
49
}