The following stanza in GetTypeId() will restrict the value to
-5s <= m_timeWithBounds <= 10s
.AddAttribute ("TestTimeWithBounds", "help text",
TimeValue (Seconds (-2)),
MakeTimeAccessor (&AttributeObjectTest::m_timeWithBounds),
MakeTimeChecker (Seconds (-5), Seconds (10)))