when to take medicines for diabetes