Hardware unit test

@icbat Here's that metaclassing I told you about. :) Lemme know what you think.

<!---
@huboard:{"order":1.5,"milestone_order":16,"custom_state":""}
-->

This was changed specifically for the unit test.  Basically to use the mock library to mock out the sleep call, I need to be able to pass a mock time object otherwise the unit test is super slow.