Collisions with vehicles are one of the leading causes for fatal and non-fatal accidents at construction sites. This paper discusses the implementation of a low-cost, battery-powered Ultra-Wideband (UWB) based collision avoidance system for use in the construction industry that can detect potential collisions between workers and vehicles in real-time. The key advantage of our proposed system compared to existing solutions is that it does not require a fixed infrastructure. We also introduce an additional metric being the time to collision, beyond the standard distance measurements. Results show that the combination of UWB and linear regression provides sufficient accuracy, with a mean error of 0.75 m in distance measurements and less than 1 s error in the time to collision for relative speeds up to 2.65 m/s. This error is even smaller for higher speeds encountered in real-life scenarios.