Although Tim Farnsworth's condition never receives an official diagnosis in The Unnamed, his relentless walking might seem to belong to the category of obsessive/compulsive disorders.
Obsessions are defined as recurrent, unavoidable thoughts, and compulsions are categorized as repetitive behaviors. Obsessive/compulsive disorder (OCD) is a type of anxiety disorder, since not performing the compulsive behavior can result in increasing anxieties, and often patients perform the compulsive behavior specifically to try - successfully or not - to ward off anxiety.
For many people suffering from compulsive behaviors, the disorder takes the form of one or more "rituals" or routines that must be performed in the exact same way each time. Common examples include repeated hand washing, repeatedly locking doors before going to bed, or returning to the house multiple times to ensure lights or burners have been turned off. These kinds of behaviors can be seen...