Implantable system for chronotherapy