Security patterns play a pivotal role in enhancing the safety and security of safety-critical systems. This study delves into the impact of adding pattern-based security on the functional requirements of the safety-critical software function. This paper introduces a pattern-based security approach and then analyzes the cost of integrating three exemplary security patterns (data confidentiality, integrity and authenticity) on the execution time of safety-critical functions. Evaluating execution times across diverse data sizes sheds light on the cost of adding pattern-based security and its impact on the functional timing (logical execution time, worst-case execution time) of the software functions of a system. Our technical findings reveal crucial tradeoffs between security and efficiency, aiding system designers in making informed decisions. These insights are crucial for the automatic code generation tools, to find the appropriate decomposition and mapping of a security enhanced software function that meets the functional timing requirements. By adhering to the ISO/SAE 21434 international standards, secure software development practices are promoted, thereby improving productivity, quality, and safety. The integration of experimental results informs the overall security posture of these systems, aiding in effective secure life-cycle management.