It's a variation of a
telescopic steel police baton. It looks fancy, but the technology is quite simple behind it.
I don't think it has anything to do with the teleportation/time travel. Also, I think we should be careful when we're talking about the cave being a portal for time travel. That is merely presumptuous speculation at this point! We are not certain yet that Ben, in fact, traveled somewhere or sometime else when he initially went into his hidden room. It's very likely he simply went in there to get the Smoke Monster. The scenes were simply juxtaposed against one another to show the correlation of why he went off the island in the first place: to confront Widmore.