define(["Ti/_/Evented","Ti/_/lang"],function(e,t){var a=Date.now(),n={},i=.2,o=t.setObject("Ti.Accelerometer",e);return require.on(window,"devicemotion",function(e){var t,r=e.acceleration||e.accelerationIncludingGravity,c=r&&{x:r.x,y:r.y,z:r.z,source:e.source};c&&(void 0!==n.x&&(Math.abs(n.x-c.x)>i||Math.abs(n.y-c.y)>i||Math.abs(n.z-c.z)>i)&&(t=Date.now(),c.timestamp=t-a,a=t,o.fireEvent("update",c)),n=c)}),o});