How does kam function in kam min laylah?

Labīd ibn Rabīʿah: Resolve, Nawār and Pre-Islamic Night Gatherings (Verses 54–61)