{"action":"created","comment":{"url":"https://api.github.com/repos/apache/incubator-mynewt-core/pulls/comments/59615690","id":59615690,"diff_hunk":"@@ -141,3 +141,19 @@ os_gettimeofday(struct os_timeval *tv, struct os_timezone *tz)\n \n     return (0);\n }\n+\n+int64_t\n+os_get_uptime_usec(void) {\n+  struct os_timeval tv;\n+  os_time_t delta;\n+  os_sr_t sr;\n+\n+  OS_ENTER_CRITICAL(sr);\n+\n+  delta = os_time_get() - basetod.ostime;\n+  os_deltatime(delta, &basetod.uptime, &tv);","path":"libs/os/src/os_time.c","position":36,"original_position":36,"commit_id":"7c0b494edb101f907b13c87f1804a49d33a9b063","original_commit_id":"7c0b494edb101f907b13c87f1804a49d33a9b063","user":{"login":"sterlinghughes","id":8572884,"avatar_url":"https://avatars.githubusercontent.com/u/8572884?v=3","gravatar_id":"","url":"https://api.github.com/users/sterlinghughes","html_url":"https://github.com/sterlinghughes","followers_url":"https://api.github.com/users/sterlinghughes/followers","following_url":"https://api.github.com/users/sterlinghughes/following{/other_user}","gists_url":"https://api.github.com/users/sterlinghughes/gists{/gist_id}","starred_url":"https://api.github.com/users/sterlinghughes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sterlinghughes/subscriptions","organizations_url":"https://api.github.com/users/sterlinghughes/orgs","repos_url":"https://api.github.com/users/sterlinghughes/repos","events_url":"https://api.github.com/users/sterlinghughes/events{/privacy}","received_events_url":"https://api.github.com/users/sterlinghughes/received_events","type":"User","site_admin":false},"body":"This is a long period to disable a critical section.  can you just grab basetod.os_time, then do the calculation?","created_at":"2016-04-13T20:05:53Z","updated_at":"2016-04-13T20:05:53Z","html_url":"https://github.com/apache/incubator-mynewt-core/pull/40#discussion_r59615690","pull_request_url":"https://api.github.com/repos/apache/incubator-mynewt-core/pulls/40","_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-mynewt-core/pulls/comments/59615690"},"html":{"href":"https://github.com/apache/incubator-mynewt-core/pull/40#discussion_r59615690"},"pull_request":{"href":"https://api.github.com/repos/apache/incubator-mynewt-core/pulls/40"}}},"pull_request":{"url":"https://api.github.com/repos/apache/incubator-mynewt-core/pulls/40","id":66377371,"html_url":"https://github.com/apache/incubator-mynewt-core/pull/40","diff_url":"https://github.com/apache/incubator-mynewt-core/pull/40.diff","patch_url":"https://github.com/apache/incubator-mynewt-core/pull/40.patch","issue_url":"https://api.github.com/repos/apache/incubator-mynewt-core/issues/40","number":40,"state":"open","locked":false,"title":"Log changes","user":{"login":"vrahane","id":7097467,"avatar_url":"https://avatars.githubusercontent.com/u/7097467?v=3","gravatar_id":"","url":"https://api.github.com/users/vrahane","html_url":"https://github.com/vrahane","followers_url":"https://api.github.com/users/vrahane/followers","following_url":"https://api.github.com/users/vrahane/following{/other_user}","gists_url":"https://api.github.com/users/vrahane/gists{/gist_id}","starred_url":"https://api.github.com/users/vrahane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vrahane/subscriptions","organizations_url":"https://api.github.com/users/vrahane/orgs","repos_url":"https://api.github.com/users/vrahane/repos","events_url":"https://api.github.com/users/vrahane/events{/privacy}","received_events_url":"https://api.github.com/users/vrahane/received_events","type":"User","site_admin":false},"body":"- Adding/Changing fields(msg, ts, entries) to log entries\r\n- Fixing json encode for 64 bit data types\r\n- Adding os_time function to get uptime in microsenconds\r\n- Changing json responses to contain multiple log entries","created_at":"2016-04-13T19:27:55Z","updated_at":"2016-04-13T20:05:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"848b08cb3f144c5d85464d29a047c952ca99424e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/incubator-mynewt-core/pulls/40/commits","review_comments_url":"https://api.github.com/repos/apache/incubator-mynewt-core/pulls/40/comments","review_comment_url":"https://api.github.com/repos/apache/incubator-mynewt-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/incubator-mynewt-core/issues/40/comments","statuses_url":"https://api.github.com/repos/apache/incubator-mynewt-core/statuses/7c0b494edb101f907b13c87f1804a49d33a9b063","head":{"label":"vrahane:develop","ref":"develop","sha":"7c0b494edb101f907b13c87f1804a49d33a9b063","user":{"login":"vrahane","id":7097467,"avatar_url":"https://avatars.githubusercontent.com/u/7097467?v=3","gravatar_id":"","url":"https://api.github.com/users/vrahane","html_url":"https://github.com/vrahane","followers_url":"https://api.github.com/users/vrahane/followers","following_url":"https://api.github.com/users/vrahane/following{/other_user}","gists_url":"https://api.github.com/users/vrahane/gists{/gist_id}","starred_url":"https://api.github.com/users/vrahane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vrahane/subscriptions","organizations_url":"https://api.github.com/users/vrahane/orgs","repos_url":"https://api.github.com/users/vrahane/repos","events_url":"https://api.github.com/users/vrahane/events{/privacy}","received_events_url":"https://api.github.com/users/vrahane/received_events","type":"User","site_admin":false},"repo":{"id":55081567,"name":"incubator-mynewt-core","full_name":"vrahane/incubator-mynewt-core","owner":{"login":"vrahane","id":7097467,"avatar_url":"https://avatars.githubusercontent.com/u/7097467?v=3","gravatar_id":"","url":"https://api.github.com/users/vrahane","html_url":"https://github.com/vrahane","followers_url":"https://api.github.com/users/vrahane/followers","following_url":"https://api.github.com/users/vrahane/following{/other_user}","gists_url":"https://api.github.com/users/vrahane/gists{/gist_id}","starred_url":"https://api.github.com/users/vrahane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vrahane/subscriptions","organizations_url":"https://api.github.com/users/vrahane/orgs","repos_url":"https://api.github.com/users/vrahane/repos","events_url":"https://api.github.com/users/vrahane/events{/privacy}","received_events_url":"https://api.github.com/users/vrahane/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vrahane/incubator-mynewt-core","description":"Mirror of Apache MyNewt Core (Incubating)","fork":true,"url":"https://api.github.com/repos/vrahane/incubator-mynewt-core","forks_url":"https://api.github.com/repos/vrahane/incubator-mynewt-core/forks","keys_url":"https://api.github.com/repos/vrahane/incubator-mynewt-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vrahane/incubator-mynewt-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vrahane/incubator-mynewt-core/teams","hooks_url":"https://api.github.com/repos/vrahane/incubator-mynewt-core/hooks","issue_events_url":"https://api.github.com/repos/vrahane/incubator-mynewt-core/issues/events{/number}","events_url":"https://api.github.com/repos/vrahane/incubator-mynewt-core/events","assignees_url":"https://api.github.com/repos/vrahane/incubator-mynewt-core/assignees{/user}","branches_url":"https://api.github.com/repos/vrahane/incubator-mynewt-core/branches{/branch}","tags_url":"https://api.github.com/repos/vrahane/incubator-mynewt-core/tags","blobs_url":"https://api.github.com/repos/vrahane/incubator-mynewt-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vrahane/incubator-mynewt-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vrahane/incubator-mynewt-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/vrahane/incubator-mynewt-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vrahane/incubator-mynewt-core/statuses/{sha}","languages_url":"https://api.github.com/repos/vrahane/incubator-mynewt-core/languages","stargazers_url":"https://api.github.com/repos/vrahane/incubator-mynewt-core/stargazers","contributors_url":"https://api.github.com/repos/vrahane/incubator-mynewt-core/contributors","subscribers_url":"https://api.github.com/repos/vrahane/incubator-mynewt-core/subscribers","subscription_url":"https://api.github.com/repos/vrahane/incubator-mynewt-core/subscription","commits_url":"https://api.github.com/repos/vrahane/incubator-mynewt-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/vrahane/incubator-mynewt-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/vrahane/incubator-mynewt-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/vrahane/incubator-mynewt-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/vrahane/incubator-mynewt-core/contents/{+path}","compare_url":"https://api.github.com/repos/vrahane/incubator-mynewt-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vrahane/incubator-mynewt-core/merges","archive_url":"https://api.github.com/repos/vrahane/incubator-mynewt-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vrahane/incubator-mynewt-core/downloads","issues_url":"https://api.github.com/repos/vrahane/incubator-mynewt-core/issues{/number}","pulls_url":"https://api.github.com/repos/vrahane/incubator-mynewt-core/pulls{/number}","milestones_url":"https://api.github.com/repos/vrahane/incubator-mynewt-core/milestones{/number}","notifications_url":"https://api.github.com/repos/vrahane/incubator-mynewt-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vrahane/incubator-mynewt-core/labels{/name}","releases_url":"https://api.github.com/repos/vrahane/incubator-mynewt-core/releases{/id}","deployments_url":"https://api.github.com/repos/vrahane/incubator-mynewt-core/deployments","created_at":"2016-03-30T17:06:53Z","updated_at":"2016-03-30T17:07:01Z","pushed_at":"2016-04-13T19:20:40Z","git_url":"git://github.com/vrahane/incubator-mynewt-core.git","ssh_url":"git@github.com:vrahane/incubator-mynewt-core.git","clone_url":"https://github.com/vrahane/incubator-mynewt-core.git","svn_url":"https://github.com/vrahane/incubator-mynewt-core","homepage":"","size":6830,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:develop","ref":"develop","sha":"a04dba6a50fecb3b4ab5a7ad0a92ba5778cec34c","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":45165993,"name":"incubator-mynewt-core","full_name":"apache/incubator-mynewt-core","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/incubator-mynewt-core","description":"Mirror of Apache MyNewt Core (Incubating)","fork":false,"url":"https://api.github.com/repos/apache/incubator-mynewt-core","forks_url":"https://api.github.com/repos/apache/incubator-mynewt-core/forks","keys_url":"https://api.github.com/repos/apache/incubator-mynewt-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/incubator-mynewt-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/incubator-mynewt-core/teams","hooks_url":"https://api.github.com/repos/apache/incubator-mynewt-core/hooks","issue_events_url":"https://api.github.com/repos/apache/incubator-mynewt-core/issues/events{/number}","events_url":"https://api.github.com/repos/apache/incubator-mynewt-core/events","assignees_url":"https://api.github.com/repos/apache/incubator-mynewt-core/assignees{/user}","branches_url":"https://api.github.com/repos/apache/incubator-mynewt-core/branches{/branch}","tags_url":"https://api.github.com/repos/apache/incubator-mynewt-core/tags","blobs_url":"https://api.github.com/repos/apache/incubator-mynewt-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/incubator-mynewt-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/incubator-mynewt-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/incubator-mynewt-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/incubator-mynewt-core/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/incubator-mynewt-core/languages","stargazers_url":"https://api.github.com/repos/apache/incubator-mynewt-core/stargazers","contributors_url":"https://api.github.com/repos/apache/incubator-mynewt-core/contributors","subscribers_url":"https://api.github.com/repos/apache/incubator-mynewt-core/subscribers","subscription_url":"https://api.github.com/repos/apache/incubator-mynewt-core/subscription","commits_url":"https://api.github.com/repos/apache/incubator-mynewt-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/incubator-mynewt-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/incubator-mynewt-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/incubator-mynewt-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/incubator-mynewt-core/contents/{+path}","compare_url":"https://api.github.com/repos/apache/incubator-mynewt-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/incubator-mynewt-core/merges","archive_url":"https://api.github.com/repos/apache/incubator-mynewt-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/incubator-mynewt-core/downloads","issues_url":"https://api.github.com/repos/apache/incubator-mynewt-core/issues{/number}","pulls_url":"https://api.github.com/repos/apache/incubator-mynewt-core/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/incubator-mynewt-core/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/incubator-mynewt-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/incubator-mynewt-core/labels{/name}","releases_url":"https://api.github.com/repos/apache/incubator-mynewt-core/releases{/id}","deployments_url":"https://api.github.com/repos/apache/incubator-mynewt-core/deployments","created_at":"2015-10-29T07:00:07Z","updated_at":"2016-04-05T05:08:05Z","pushed_at":"2016-04-13T19:27:56Z","git_url":"git://github.com/apache/incubator-mynewt-core.git","ssh_url":"git@github.com:apache/incubator-mynewt-core.git","clone_url":"https://github.com/apache/incubator-mynewt-core.git","svn_url":"https://github.com/apache/incubator-mynewt-core","homepage":"","size":7041,"stargazers_count":34,"watchers_count":34,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":13,"mirror_url":"git://git.apache.org/incubator-mynewt-larva.git","open_issues_count":1,"forks":13,"open_issues":1,"watchers":34,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-mynewt-core/pulls/40"},"html":{"href":"https://github.com/apache/incubator-mynewt-core/pull/40"},"issue":{"href":"https://api.github.com/repos/apache/incubator-mynewt-core/issues/40"},"comments":{"href":"https://api.github.com/repos/apache/incubator-mynewt-core/issues/40/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/incubator-mynewt-core/pulls/40/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/incubator-mynewt-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/incubator-mynewt-core/pulls/40/commits"},"statuses":{"href":"https://api.github.com/repos/apache/incubator-mynewt-core/statuses/7c0b494edb101f907b13c87f1804a49d33a9b063"}}}}