{"action":"created","issue":{"url":"https://api.github.com/repos/gopherjs/gopherjs/issues/279","labels_url":"https://api.github.com/repos/gopherjs/gopherjs/issues/279/labels{/name}","comments_url":"https://api.github.com/repos/gopherjs/gopherjs/issues/279/comments","events_url":"https://api.github.com/repos/gopherjs/gopherjs/issues/279/events","html_url":"https://github.com/gopherjs/gopherjs/issues/279","id":103288427,"number":279,"title":"Error with time.Sleep","user":{"login":"govlas","id":12821400,"avatar_url":"https://avatars.githubusercontent.com/u/12821400?v=3","gravatar_id":"","url":"https://api.github.com/users/govlas","html_url":"https://github.com/govlas","followers_url":"https://api.github.com/users/govlas/followers","following_url":"https://api.github.com/users/govlas/following{/other_user}","gists_url":"https://api.github.com/users/govlas/gists{/gist_id}","starred_url":"https://api.github.com/users/govlas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/govlas/subscriptions","organizations_url":"https://api.github.com/users/govlas/orgs","repos_url":"https://api.github.com/users/govlas/repos","events_url":"https://api.github.com/users/govlas/events{/privacy}","received_events_url":"https://api.github.com/users/govlas/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-26T14:52:15Z","updated_at":"2015-08-29T10:49:25Z","closed_at":null,"body":"if use gopherjs with time.Sleep without any reference to time.Time structure, this code:\r\n```go\r\npackage main\r\n\r\nimport (\r\n    \"time\"\r\n\r\n    \"github.com/gopherjs/gopherjs/js\"\r\n)\r\n\r\n//var _ = time.Now()\r\n\r\nfunc log(i ...interface{}) {\r\n    js.Global.Get(\"console\").Call(\"log\", i...)\r\n}\r\n\r\ntype Test struct {\r\n    A int\r\n    B string\r\n}\r\n\r\nfunc main() {\r\n    log(Test{1, \"hello\"})\r\n    time.Sleep(time.Second)\r\n}\r\n```\r\n\r\nproduces error in browser:\r\n```\r\ngo-js.js:1738: Uncaught TypeError: Cannot read property 'ptr' of undefined\r\n```\r\nin function $externalize\r\n```js\r\n    if (timePkg && v.constructor === timePkg.Time.ptr) {\r\n```\r\ntimePkg.Time is not defined in javascript code\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/gopherjs/gopherjs/issues/comments/135970212","html_url":"https://github.com/gopherjs/gopherjs/issues/279#issuecomment-135970212","issue_url":"https://api.github.com/repos/gopherjs/gopherjs/issues/279","id":135970212,"user":{"login":"shurcooL","id":1924134,"avatar_url":"https://avatars.githubusercontent.com/u/1924134?v=3","gravatar_id":"","url":"https://api.github.com/users/shurcooL","html_url":"https://github.com/shurcooL","followers_url":"https://api.github.com/users/shurcooL/followers","following_url":"https://api.github.com/users/shurcooL/following{/other_user}","gists_url":"https://api.github.com/users/shurcooL/gists{/gist_id}","starred_url":"https://api.github.com/users/shurcooL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shurcooL/subscriptions","organizations_url":"https://api.github.com/users/shurcooL/orgs","repos_url":"https://api.github.com/users/shurcooL/repos","events_url":"https://api.github.com/users/shurcooL/events{/privacy}","received_events_url":"https://api.github.com/users/shurcooL/received_events","type":"User","site_admin":false},"created_at":"2015-08-29T10:49:25Z","updated_at":"2015-08-29T10:49:25Z","body":"That sounds good to me. It seems that solution 1 should not have issues. We can revisit this if it does.\r\n\r\nShould I make a PR for it?"}}