A particle moving with S.H.M passes through two points A and B, with the same velocity, having occupied 2 seconds in passing from A to B; after another 2 seconds, it returns to B. The period is

A. 2 seconds
B. 4 seconds
C. 5 seconds
D. 8 seconds