how long does a motion take in court