#define STF(p, ms) (((p) * (ms)) >> 10)