As far as I know, there is no easy way to rotate about a curved axis. Your best bet would be to model the segments straight, use an array modifier, then bend them.
First model a straight segment of the object.

Next add an Empty to the scene and position it at the end of the segment. Then add an Array modifier to the segment, and uncheck Constant Offset and Relative Offset and enable Object Offset, selecting the empty as the offset object.
The Array modifier works by duplicating the geometry of the mesh and placing it at the position of the offset object, further parts of the array copy this relative transformation.

Now add a Simple Deform modifier to the object and set it to Bend with an angle of 360°. You will probably also have to add another empty and use it as the Simple Deform origin so you can rotate the axis being bent around.

You can adjust the diameter of the torus by increasing the Array count. Note that since my example model is 90°, I need to use multiples of 4 for the array modifier so that the teeth line up at the seam.
