Of course you can write a function to do busy waiting based on time. But I really doubt whether it makes sense. Even spinwait is rarely used, because it only can beats sleep when the thread needs to wait less time than the time of context switch.
spinwait is like executing a loop, and return after the counter runs out. It is different from sleep(which would go into inactive status)that spinwait is actually let your thread execute and do nothing productive(busy waiting).
I think it is useful in situations building spinlock which is commonly used in driver development.