{"action":"created","issue":{"url":"https://api.github.com/repos/glfw/glfw/issues/603","labels_url":"https://api.github.com/repos/glfw/glfw/issues/603/labels{/name}","comments_url":"https://api.github.com/repos/glfw/glfw/issues/603/comments","events_url":"https://api.github.com/repos/glfw/glfw/issues/603/events","html_url":"https://github.com/glfw/glfw/issues/603","id":106140786,"number":603,"title":"glfwSwapInterval() different behavior on win 8 and centos 7","user":{"login":"giordi91","id":2525797,"avatar_url":"https://avatars.githubusercontent.com/u/2525797?v=3","gravatar_id":"","url":"https://api.github.com/users/giordi91","html_url":"https://github.com/giordi91","followers_url":"https://api.github.com/users/giordi91/followers","following_url":"https://api.github.com/users/giordi91/following{/other_user}","gists_url":"https://api.github.com/users/giordi91/gists{/gist_id}","starred_url":"https://api.github.com/users/giordi91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giordi91/subscriptions","organizations_url":"https://api.github.com/users/giordi91/orgs","repos_url":"https://api.github.com/users/giordi91/repos","events_url":"https://api.github.com/users/giordi91/events{/privacy}","received_events_url":"https://api.github.com/users/giordi91/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-12T08:12:25Z","updated_at":"2015-09-12T10:06:02Z","closed_at":null,"body":"Hi there, I notice and odd behavior during cross compiling my project, I implemented two game loop one that runs as fast as it can one that i lock the thread until is not time to render the next frame, fixed frame rate (60fps). \r\n//lets compute how much we need sleep\r\n\t\tlong long offset = next_game_tick + Constants::TICKS_PER_FRAME;\r\n\t\tlong long sleep_time = offset - m_clock->get_ticks();\r\n\t\tif (sleep_time >= 0)\r\n\t\t{\r\n\t\t\tm_clock->sleep(sleep_time);\r\n\t\t}\r\n\t\treturn;\r\n\r\nOn centos it works all good and nice with both swap interval set to 0 and 1, on windows instead of reaching 60 fps i reach 30 fps if i have the setIntervalTo 1. I don't think is a glfw bug but I was curious to know if you guys had any Idea of what is going on, Might it be that my call comes right after the lock of glfw of the swap frame so I get twice the lock and so get 30 fps rather then 60? If that the case, any clue  why this doesn't happen on Linux? \r\n\r\nCheers"},"comment":{"url":"https://api.github.com/repos/glfw/glfw/issues/comments/139745441","html_url":"https://github.com/glfw/glfw/issues/603#issuecomment-139745441","issue_url":"https://api.github.com/repos/glfw/glfw/issues/603","id":139745441,"user":{"login":"tombsar","id":3090978,"avatar_url":"https://avatars.githubusercontent.com/u/3090978?v=3","gravatar_id":"","url":"https://api.github.com/users/tombsar","html_url":"https://github.com/tombsar","followers_url":"https://api.github.com/users/tombsar/followers","following_url":"https://api.github.com/users/tombsar/following{/other_user}","gists_url":"https://api.github.com/users/tombsar/gists{/gist_id}","starred_url":"https://api.github.com/users/tombsar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tombsar/subscriptions","organizations_url":"https://api.github.com/users/tombsar/orgs","repos_url":"https://api.github.com/users/tombsar/repos","events_url":"https://api.github.com/users/tombsar/events{/privacy}","received_events_url":"https://api.github.com/users/tombsar/received_events","type":"User","site_admin":false},"created_at":"2015-09-12T10:06:02Z","updated_at":"2015-09-12T10:06:02Z","body":"Well that does make it less likely, but I wouldn't rule it out without testing.\r\n\r\nOnly other thing I can suggest is adding debug code to record timestamps at key parts of your program, e.g. frame_begin, input_processed, rendering_finished, etc. That should narrow down which function calls are taking longer than they should."}}