When using if and can't they both have the similar "self doubt" aspect in them. Like "If I can do it..." and "I can"t do it." Both of these statements are basically questioning their self worth.
When I was afraid is the subordinate clause because "that is the time" can stand by itself and can be recognized as a independent clause. I believe that the subordinate clause would fall under the adjective clause family, mainly because "when I was afraid" directly refers to "time", which is a noun.