function listener()

in src/browser/AccelerometerProxy.js [22:33]


function listener (success) {
    var accel = {};

    accel.x = Math.round((Math.random() * 2 - 1) * 100) / 100;
    accel.y = Math.round((Math.random() * 2 - 1) * 100) / 100;
    accel.z = Math.round((Math.random() * 2 - 1) * 100) / 100;
    accel.timestamp = new Date().getTime();

    success(accel);

    window.removeEventListener('devicemotion', listener, false);
}