detect 360 spin on mobile device

Hello. whats the best way to detect if a mobile device has been spun around 360 degrees within say 1 second? I would like this detection support iOS and android

Use Input.compass or Input.gyro for that.