fixed period.c for Windows C compiler