I got it, thanks to searching in here for other time related expressions, and trial and error, and realizing we needed to tell the layer what the original duration was, otherwise how would after effects know where to put the out animation. I hope others find this helpful.
And thanks so much to all of you who posted in the past when i was doing the searches;
inDur = 1; // replace 1 with the duration of your in animation, in seconds, or divide frames by framerate
outDur = 1; // replace 1 with the duration of your out animation, in seconds, or divide frames by framerate
originalDuration = thisLayer.source.duration;
if (time <= inPoint + inDur) {
linear(time, inPoint, inPoint + inDur, 0, inDur);
} else if (time >= outPoint – outDur) {
linear(time, outPoint – outDur, outPoint, originalDuration – outDur, originalDuration);
} else {
inDur;
}