can generate sine wave for duration of time